From f866ade52474689304401c0931095ffb88af962c Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sun, 18 Feb 2024 08:50:07 -0500 Subject: [PATCH] +libtom.net/math (#5247) --- .github/workflows/cd.pantry.tgz.yml | 35 +++++++++++++++++++++++++++ .github/workflows/cd.yml | 21 ---------------- projects/libtom.net/math/package.yml | 36 ++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/cd.pantry.tgz.yml create mode 100644 projects/libtom.net/math/package.yml diff --git a/.github/workflows/cd.pantry.tgz.yml b/.github/workflows/cd.pantry.tgz.yml new file mode 100644 index 00000000..95e20423 --- /dev/null +++ b/.github/workflows/cd.pantry.tgz.yml @@ -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 diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 4d74da96..3d8fe3d1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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 diff --git a/projects/libtom.net/math/package.yml b/projects/libtom.net/math/package.yml new file mode 100644 index 00000000..41cbae39 --- /dev/null +++ b/projects/libtom.net/math/package.yml @@ -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 + #include + int main() { + printf("%s", mp_error_to_string(1)); + return 0; + } + extname: .c + run: + - cc $FIXTURE -ltommath + - test "$(./a.out)" = "Invalid error code"