+libtom.net/math (#5247)

This commit is contained in:
Max Howell 2024-02-18 08:50:07 -05:00 committed by GitHub
parent 2e7e6025f6
commit f866ade524
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 71 additions and 21 deletions

35
.github/workflows/cd.pantry.tgz.yml vendored Normal file
View file

@ -0,0 +1,35 @@
name: cd
run-name: "cd: pantry.tgz"
on:
push:
branches: main
paths:
- projects/**/*
- .github/workflows/cd.pantry.tgz.yml
concurrency:
group: cd.pantry.tgz
cancel-in-progress: true
jobs:
tarball:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- uses: actions/checkout@v4
with:
path: co
- run: find co -type f -not -name package.yml -delete -o -type l -delete
- run: tar -C co -czf pantry.tgz .
- run: aws s3 cp
./pantry.tgz
s3://${{ secrets.AWS_S3_BUCKET }}/pantry.tgz
- run: aws cloudfront create-invalidation
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
--paths /pantry.tgz

View file

@ -37,24 +37,3 @@ jobs:
with:
projects: ${{ needs.ingest.outputs.projects }}
secrets: inherit
tarball:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- uses: actions/checkout@v4
with:
path: co
- run: find co -type f -not -name package.yml -delete -o -type l -delete
- run: tar -C co -czf pantry.tgz .
- run: aws s3 cp
./pantry.tgz
s3://${{ secrets.AWS_S3_BUCKET }}/pantry.tgz
- run: aws cloudfront create-invalidation
--distribution-id ${{ secrets.AWS_CF_DISTRIBUTION_ID }}
--paths /pantry.tgz

View file

@ -0,0 +1,36 @@
distributable:
url: https://github.com/libtom/libtommath/releases/download/{{version.tag}}/ltm-{{version}}.tar.xz
strip-components: 1
display-name: LibTomMath
versions:
github: libtom/libtommath
build:
dependencies:
gnu.org/libtool: ^2.4.7
env:
PREFIX: ${{prefix}}
script:
- make
--file makefile.shared
--jobs {{ hw.concurrency }}
install
test:
linux:
llvm.org: '*'
script:
- fixture:
content: |
#include <tommath.h>
#include <stdio.h>
int main() {
printf("%s", mp_error_to_string(1));
return 0;
}
extname: .c
run:
- cc $FIXTURE -ltommath
- test "$(./a.out)" = "Invalid error code"