Skip to content

Commit

Permalink
Add rest of tests from c.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wysiwys committed Feb 5, 2025
1 parent 4470fd1 commit 5de7d07
Showing 1 changed file with 146 additions and 1 deletion.
147 changes: 146 additions & 1 deletion .github/workflows/docker-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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' }}

0 comments on commit 5de7d07

Please sign in to comment.