From d2ff7eecde52d1f83a8192f26f09f37fce16a7e0 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Strub Date: Mon, 8 Apr 2024 15:05:47 +0200 Subject: [PATCH 1/3] [ci] external projects description outside of the workflow file --- .github/workflows/ci.yml | 36 +++++++++++++++++++++++++-------- .github/workflows/external.json | 9 +++++++++ 2 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/external.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dffa93138..7a46654a14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,9 +95,25 @@ jobs: path: report.log if-no-files-found: ignore + fetch-external-matrix: + name: Fetch EasyCrypt External Projects Matrix + needs: [pre_job, compile-opam] + if: needs.pre_job.outputs.should_skip != 'true' + runs-on: ubuntu-20.04 + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - uses: actions/checkout@v3 + with: + path: 'easycrypt' + - id: set-matrix + run: | + JSON=$(jq -c . < easycrypt/.github/workflows/external.json) + echo "::set-output name=matrix::${JSON}" + external: name: Check EasyCrypt External Projects - needs: [pre_job, compile-opam] + needs: [fetch-external-matrix] if: needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-20.04 container: @@ -105,15 +121,15 @@ jobs: strategy: fail-fast: false matrix: - target: [ [ 'jasmin-eclib', 'jasmin-lang/jasmin', 'eclib', 'tests.config', 'jasmin' ] ] + target: ${{fromJson(needs.fetch-external-matrix.outputs.matrix)}} steps: - uses: actions/checkout@v3 with: - path: 'easycrypt' + path: easycrypt - uses: actions/checkout@v3 with: - path: 'project' - repository: ${{ matrix.target[1] }} + path: project/${{ matrix.target.name }} + repository: ${{ matrix.target.repository }} - name: Update OPAM & EasyCrypt dependencies run: | opam update @@ -126,13 +142,17 @@ jobs: rm -f ~/.why3.conf ~/.config/easycrypt/why3.conf opam exec -- easycrypt why3config - name: Compile project - working-directory: project/${{ matrix.target[2] }} - run: opam exec -- easycrypt runtest ${{ matrix.target[3] }} ${{ matrix.target[4] }} + working-directory: project/${{ matrix.target.name }}/${{ matrix.target.subdir }} + run: | + opam exec -- easycrypt runtest \ + ${{ matrix.target.options }} \ + ${{ matrix.target.config }} \ + ${{ matrix.target.scenario }} - uses: actions/upload-artifact@v3 name: Upload report.log if: always() with: - name: report.log (${{ matrix.target[0] }}) + name: report.log (${{ matrix.target.name }}) path: report.log if-no-files-found: ignore diff --git a/.github/workflows/external.json b/.github/workflows/external.json new file mode 100644 index 0000000000..0c75372de2 --- /dev/null +++ b/.github/workflows/external.json @@ -0,0 +1,9 @@ +[ + { "name" : "jasmin-eclib" + , "repository" : "jasmin-lang/jasmin" + , "subdir" : "eclib" + , "config" : "tests.config" + , "scenario" : "jasmin" + , "options" : "" + } +] From 5c91c710706a683057e04f64c0e73ac6a979f1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Dupressoir?= Date: Fri, 12 Apr 2024 12:26:31 +0200 Subject: [PATCH 2/3] [ci] external CI supports non-github repos Co-authored-by: Pierre-Yves Strub --- .github/workflows/ci.yml | 9 +++++---- .github/workflows/external.json | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a46654a14..e696b83647 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,10 +126,11 @@ jobs: - uses: actions/checkout@v3 with: path: easycrypt - - uses: actions/checkout@v3 - with: - path: project/${{ matrix.target.name }} - repository: ${{ matrix.target.repository }} + - name: Checkout External Project + run: | + git clone -b ${{ matrix.target.branch }} \ + ${{ matrix.target.repository }} \ + project/${{ matrix.target.name }} - name: Update OPAM & EasyCrypt dependencies run: | opam update diff --git a/.github/workflows/external.json b/.github/workflows/external.json index 0c75372de2..f7df443bd0 100644 --- a/.github/workflows/external.json +++ b/.github/workflows/external.json @@ -1,6 +1,7 @@ [ { "name" : "jasmin-eclib" - , "repository" : "jasmin-lang/jasmin" + , "repository" : "https://github.com/jasmin-lang/jasmin" + , "branch" : "main" , "subdir" : "eclib" , "config" : "tests.config" , "scenario" : "jasmin" From 37ccc35f68adfba972222e3f645f79c637f7c25b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Dupressoir?= Date: Fri, 12 Apr 2024 12:28:24 +0200 Subject: [PATCH 3/3] [ci] add SHA3 to external CI Proofs are checked in weak-mode. Co-authored-by: Pierre-Yves Strub --- .github/workflows/external.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/external.json b/.github/workflows/external.json index f7df443bd0..f6bd68bb33 100644 --- a/.github/workflows/external.json +++ b/.github/workflows/external.json @@ -7,4 +7,15 @@ , "scenario" : "jasmin" , "options" : "" } + + , + + { "name" : "sha3" + , "repository" : "https://gitlab.com/easycrypt/sha3" + , "branch" : "next" + , "subdir" : "." + , "config" : "config/tests.config" + , "scenario" : "sponge" + , "options" : "-pragmas Proofs:weak" + } ]