Skip to content

Commit

Permalink
[CI] Upload standalone archives to releases
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross committed Nov 10, 2023
1 parent 6961338 commit 4d95c90
Show file tree
Hide file tree
Showing 5 changed files with 307 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/coq-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
merge_group:
workflow_dispatch:
release:
types: [published]
schedule:
- cron: '0 0 1 * *'

Expand Down Expand Up @@ -91,6 +93,66 @@ jobs:
- name: display per-line timing info
run: etc/ci/github-actions-display-per-line-timing.sh

test-standalone-alpine:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download standalone edge
uses: actions/download-artifact@v3
with:
name: standalone-edge
path: dist-edge/
- name: List files
run: find dist-edge
- name: Rename files
run: |
mkdir dist
mv dist-edge/standalone.tar.gz dist/fiat-crypto-alpine-edge.tar.gz
find dist
tar -tvf dist/fiat-crypto-alpine-edge.tar.gz
- name: Unpack and Test files
run: |
cd dist
tar -xzvf fiat-crypto-alpine-edge.tar.gz
ls -la .
for prog in word_by_word_montgomery unsaturated_solinas saturated_solinas base_conversion; do
echo "::group::$prog"
./$prog -h
echo "::endgroup::"
done
publish-standalone:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- uses: actions/checkout@v4
- name: Download standalone edge
uses: actions/download-artifact@v3
with:
name: standalone-edge
path: dist-edge/
- name: List files
run: find dist-edge
- name: Unpack files
run: |
mkdir dist
mv dist-edge/standalone.tar.gz dist/fiat-crypto-alpine-edge.tar.gz
find dist
tar -tvf dist/fiat-crypto-alpine-edge.tar.gz
- name: Upload artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' }}

alpine-check-all:
runs-on: ubuntu-latest
needs: [build]
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/coq-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
merge_group:
workflow_dispatch:
release:
types: [published]
schedule:
- cron: '0 0 1 * *'

Expand Down Expand Up @@ -113,6 +115,66 @@ jobs:
env:
ALLOW_DIFF: 1

test-standalone-debian:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Download standalone sid
uses: actions/download-artifact@v3
with:
name: standalone-sid
path: dist-sid/
- name: List files
run: find dist-sid
- name: Rename files
run: |
mkdir dist
mv dist-sid/standalone.tar.gz dist/fiat-crypto-sid.tar.gz
find dist
tar -tvf dist/fiat-crypto-sid.tar.gz
- name: Unpack and Test files
run: |
cd dist
tar -xzvf fiat-crypto-sid.tar.gz
ls -la .
for prog in word_by_word_montgomery unsaturated_solinas saturated_solinas base_conversion; do
echo "::group::$prog"
./$prog -h
echo "::endgroup::"
done
publish-standalone:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- uses: actions/checkout@v4
- name: Download standalone sid
uses: actions/download-artifact@v3
with:
name: standalone-sid
path: dist-sid/
- name: List files
run: find dist-sid
- name: Unpack files
run: |
mkdir dist
mv dist-sid/standalone.tar.gz dist/fiat-crypto-sid.tar.gz
find dist
tar -tvf dist/fiat-crypto-sid.tar.gz
- name: Upload artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' }}

debian-check-all:
runs-on: ubuntu-latest
needs: [build, test-amd64]
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/coq-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
merge_group:
workflow_dispatch:
release:
types: [published]
schedule:
- cron: '0 0 1 * *'

Expand Down Expand Up @@ -96,3 +98,63 @@ jobs:
# eval $(opam env)
# make TIMED=1 validate COQCHKFLAGS="-o ${COQCHKEXTRAFLAGS}"
# if: github.event_name != 'pull_request'

test-standalone-macos:
runs-on: macos-latest
needs: build-macos
steps:
- uses: actions/checkout@v4
- name: Download standalone MacOS
uses: actions/download-artifact@v3
with:
name: standalone-macos
path: dist-macos/
- name: List files
run: find dist-macos
- name: Rename files
run: |
mkdir dist
mv dist-macos/standalone.tar.gz dist/fiat-crypto-macos.tar.gz
find dist
tar -tvf dist/fiat-crypto-macos.tar.gz
- name: Unpack and Test files
run: |
cd dist
tar -xzvf fiat-crypto-macos.tar.gz
ls -la .
for prog in word_by_word_montgomery unsaturated_solinas saturated_solinas base_conversion; do
startGroup $prog
./$prog -h
endGroup $prog
done
publish-standalone:
runs-on: ubuntu-latest
needs: build-macos
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- uses: actions/checkout@v4
- name: Download standalone MacOS
uses: actions/download-artifact@v3
with:
name: standalone-macos
path: dist-macos/
- name: List files
run: find dist-macos
- name: Unpack files
run: |
mkdir dist
mv dist-macos/standalone.tar.gz dist/fiat-crypto-macos.tar.gz
find dist
tar -tvf dist/fiat-crypto-macos.tar.gz
- name: Upload artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' }}
59 changes: 59 additions & 0 deletions .github/workflows/coq-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
pull_request:
merge_group:
workflow_dispatch:
release:
types: [published]
schedule:
- cron: '0 0 1 * *'

Expand Down Expand Up @@ -116,3 +118,60 @@ jobs:
# %CYGWIN_ROOT%\bin\bash.exe -l -c 'cd "%cd%"; opam exec -- make TIMED=1 validate COQCHKFLAGS="-o ${COQCHKEXTRAFLAGS}"'
# shell: cmd
# if: github.event_name != 'pull_request'

test-standalone-windows:
runs-on: windows-latest
needs: build-windows
steps:
- uses: actions/checkout@v4
- name: Download standalone Windows
uses: actions/download-artifact@v3
with:
name: standalone-windows
path: dist-windows/
- name: List files
run: Get-ChildItem dist-windows -Name
- name: Rename files
run: |
New-Item -ItemType Directory -Path dist
Move-Item dist-windows/standalone.zip dist/fiat-crypto-windows.zip
Get-ChildItem dist -Name
- name: Unpack files
run: |
Expand-Archive -Path dist/fiat-crypto-windows.zip -DestinationPath dist
Get-ChildItem dist
- run: .\dist\word_by_word_montgomery.exe -h
- run: .\dist\unsaturated_solinas.exe -h
- run: .\dist\saturated_solinas.exe -h
- run: .\dist\base_conversion.exe -h

publish-standalone:
runs-on: ubuntu-latest
needs: build-windows
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- uses: actions/checkout@v4
- name: Download standalone Windows
uses: actions/download-artifact@v3
with:
name: standalone-windows
path: dist-windows/
- name: List files
run: find dist-windows
- name: Unpack files
run: |
mkdir dist
mv dist-windows/standalone.zip dist/fiat-crypto-windows.zip
find dist
unzip -l dist/fiat-crypto-windows.zip
- name: Upload artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' }}
62 changes: 62 additions & 0 deletions .github/workflows/docker-coq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
merge_group:
workflow_dispatch:
release:
types: [published]
schedule:
- cron: '0 0 1 * *'

Expand Down Expand Up @@ -131,3 +133,63 @@ jobs:
run: etc/ci/github-actions-make.sh -f Makefile.examples -j2 only-test-amd64-files SLOWEST_FIRST=1
env:
ALLOW_DIFF: 1

test-standalone-docker:
runs-on: ubuntu-latest
needs: docker-build
steps:
- uses: actions/checkout@v4
- name: Download standalone Docker
uses: actions/download-artifact@v3
with:
name: standalone-docker-coq-dev
path: dist-docker-coq-dev/
- name: List files
run: find dist-docker-coq-dev
- name: Rename files
run: |
mkdir dist
mv dist-docker-coq-dev/standalone.tar.gz dist/fiat-crypto-docker-coq-dev.tar.gz
find dist
tar -tvf dist/fiat-crypto-docker-coq-dev.tar.gz
- name: Unpack and Test files
run: |
cd dist
tar -xzvf fiat-crypto-docker-coq-dev.tar.gz
ls -la .
for prog in word_by_word_montgomery unsaturated_solinas saturated_solinas base_conversion; do
echo "::group::$prog"
./$prog -h
echo "::endgroup::"
done
publish-standalone:
runs-on: ubuntu-latest
needs: docker-build
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
steps:
- uses: actions/checkout@v4
- name: Download standalone Docker
uses: actions/download-artifact@v3
with:
name: standalone-docker-coq-dev
path: dist-docker-coq-dev/
- name: List files
run: find dist-docker-coq-dev
- name: Unpack files
run: |
mkdir dist
mv dist-docker-coq-dev/standalone.tar.gz dist/fiat-crypto-docker-coq-dev.tar.gz
find dist
tar -tvf dist/fiat-crypto-docker-coq-dev.tar.gz
- name: Upload artifacts to GitHub Release
env:
GITHUB_TOKEN: ${{ github.token }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages
run: >-
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
if: ${{ startsWith(github.ref, 'refs/tags/') && github.event_name == 'release' }}

0 comments on commit 4d95c90

Please sign in to comment.