diff --git a/.github/workflows/docker-c.yml b/.github/workflows/docker-c.yml index 866161b94..78e07cc2b 100644 --- a/.github/workflows/docker-c.yml +++ b/.github/workflows/docker-c.yml @@ -43,7 +43,7 @@ jobs: test-extract: runs-on: ubuntu-latest container: - image: ghcr.io/${{ env.IMAGE_NAME }}:${{ env.VERSION_TAG }} + image: ghcr.io/cryspen/libcrux-c:latest defaults: run: working-directory: libcrux-ml-kem @@ -62,3 +62,148 @@ jobs: path: libcrux-ml-kem/c include-hidden-files: true if-no-files-found: error + test-extract-header-only-ml-kem: + runs-on: ubuntu-latest + container: + image: ghcr.io/cryspen/libcrux-c:latest + defaults: + run: + working-directory: libcrux-ml-kem + shell: bash + steps: + - uses: actions/checkout@v4 + + - name: Extract C (header only) + run: | + ./boring.sh --no-clean + + - name: Upload header only C extraction + uses: actions/upload-artifact@v4 + with: + name: header-only-c-extraction-ml-kem + path: libcrux-ml-kem/cg/ + include-hidden-files: true + if-no-files-found: error + test-extract-header-only-ml-dsa: + runs-on: ubuntu-latest + container: + image: ghcr.io/cryspen/libcrux-c:latest + defaults: + run: + working-directory: libcrux-ml-dsa + shell: bash + steps: + - uses: actions/checkout@v4 + + - name: Extract C (header only) + run: | + ./boring.sh --no-clean + + - name: Upload header only C extraction + uses: actions/upload-artifact@v4 + with: + name: header-only-c-extraction-ml-dsa + path: libcrux-ml-dsa/cg/ + include-hidden-files: true + if-no-files-found: error + test-build: + needs: [test-extract] + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - uses: actions/download-artifact@v4 + with: + name: c-extraction + + - name: 🔨 Build + run: | + LIBCRUX_BENCHMARKS=1 cmake -B build + cmake --build build + + - name: 🏃🏻‍♀️ Test + run: ./build/Debug/ml_kem_test + if: ${{ matrix.os == 'windows-latest' }} + + - name: 🏃🏻‍♀️ Test + run: ./build/ml_kem_test + if: ${{ matrix.os != 'windows-latest' }} + + - name: 🔨 Build Release + run: | + rm -rf build + LIBCRUX_BENCHMARKS=1 cmake -B build -DCMAKE_BUILD_TYPE=Release + cmake --build build --config Release + if: ${{ matrix.os != 'windows-latest' }} + test-build-header-only-ml-kem: + needs: [test-extract-header-only-ml-kem] + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - uses: actions/download-artifact@v4 + with: + name: header-only-c-extraction-ml-kem + + - name: 🔨 Build + run: | + cmake -B build + cmake --build build + # FIXME: Benchmark build for cg on Windows CI is not working right now. + + - name: 🏃🏻‍♀️ Test + run: ./build/ml_kem_test + if: ${{ matrix.os != 'windows-latest' }} + + - name: 🏃🏻‍♀️ Test + run: ./build/Debug/ml_kem_test + if: ${{ matrix.os == 'windows-latest' }} + + test-build-header-only-ml-dsa: + needs: [test-extract-header-only-ml-dsa] + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash + steps: + - uses: actions/download-artifact@v4 + with: + name: header-only-c-extraction-ml-dsa + + - name: 🔨 Build + run: | + cmake -B build + cmake --build build + + - name: 🏃🏻‍♀️ Test + run: ./build/ml_dsa_test + if: ${{ matrix.os != 'windows-latest' }} + + - name: 🏃🏻‍♀️ Test + run: ./build/Debug/ml_dsa_test + if: ${{ matrix.os == 'windows-latest' }} +