Skip to content

Commit

Permalink
CI: add constantine-rust / ZAL to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mratsim committed Dec 2, 2023
1 parent 381b7b4 commit 8f466be
Showing 1 changed file with 48 additions and 16 deletions.
64 changes: 48 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,51 @@ jobs:
max-parallel: 20
matrix:
nim_version: [version-1-6] # [version-1-4, devel]
rust_toolchain: [stable] # [beta, nightly]
target:
- os: linux
cpu: i386
TEST_LANG: c
BACKEND: NO_ASM
SHELL: bash
- os: linux
cpu: i386
TEST_LANG: c
BACKEND: ASM
SHELL: bash

- os: linux
cpu: amd64
TEST_LANG: c
BACKEND: NO_ASM
SHELL: bash
- os: linux
cpu: amd64
TEST_LANG: c
BACKEND: ASM
SHELL: bash

- os: windows
cpu: amd64
TEST_LANG: c
BACKEND: NO_ASM
SHELL: msys2 {0}
- os: windows
cpu: amd64
TEST_LANG: c
BACKEND: ASM
SHELL: msys2 {0}

- os: macos
cpu: amd64
TEST_LANG: c
BACKEND: NO_ASM
SHELL: bash
- os: macos
cpu: amd64
TEST_LANG: c
BACKEND: ASM
SHELL: bash
include:
- target:
os: linux
Expand Down Expand Up @@ -231,43 +240,66 @@ jobs:
nim -v
gcc -v
- name: Run Constantine tests (UNIX with Assembly)
if: runner.os != 'Windows' && matrix.target.BACKEND == 'ASM'
shell: bash
- name: Run Constantine as C library tests (with Assembly)
if: matrix.target.BACKEND == 'ASM'
shell: ${{ matrix.target.SHELL }}
run: |
cd constantine
nimble make_lib --verbose
nimble make_headers --verbose
nimble test_lib --verbose
- name: Run Constantine as C library tests (NO Assembly)
if: matrix.target.BACKEND == 'NO_ASM'
shell: ${{ matrix.target.SHELL }}
run: |
cd constantine
CTT_ASM=0 nimble make_lib --verbose
nimble make_headers --verbose
nimble test_lib --verbose
- name: Run Constantine as Rust library tests (with Assembly)
if: matrix.target.BACKEND == 'ASM'
shell: ${{ matrix.target.SHELL }}
run: |
cd constantine
rustup update ${{ matrix.rust_toolchain }} && rustup default ${{ matrix.rust_toolchain }}
cargo build --verbose
cargo test --verbose
- name: Run Constantine as Rust library tests (NO Assembly)
if: matrix.target.BACKEND == 'NO_ASM'
shell: ${{ matrix.target.SHELL }}
run: |
cd constantine
rustup update ${{ matrix.rust_toolchain }} && rustup default ${{ matrix.rust_toolchain }}
CTT_ASM=0 cargo build --verbose
CTT_ASM=0 cargo test --verbose
- name: Run Constantine in-depth tests (with GMP, with Assembly)
if: runner.os != 'Windows' && matrix.target.BACKEND == 'ASM'
shell: msys2 {0}
run: |
cd constantine
nimble test_parallel --verbose
- name: Run Constantine tests (UNIX no Assembly)
- name: Run Constantine in-depth tests (with GMP, no Assembly)
if: runner.os != 'Windows' && matrix.target.BACKEND == 'NO_ASM'
shell: bash
shell: msys2 {0}
run: |
cd constantine
CTT_ASM=0 nimble make_lib --verbose
nimble make_headers --verbose
nimble test_lib --verbose
CTT_ASM=0 nimble test_parallel --verbose
- name: Run Constantine tests (Windows with Assembly)
- name: Run Constantine in-depth tests (no GMP, with Assembly)
# So "test_bindings" uses C and can find GMP
# but nim-gmp cannot find GMP on Windows CI
if: runner.os == 'Windows' && matrix.target.BACKEND == 'ASM'
shell: msys2 {0}
run: |
cd constantine
nimble make_lib --verbose
nimble make_headers --verbose
nimble test_lib --verbose
nimble test_parallel_no_gmp --verbose
- name: Run Constantine tests (Windows no Assembly)
- name: Run Constantine in-depth tests (no GMP, no Assembly)
# So "test_bindings" uses C and can find GMP
# but nim-gmp cannot find GMP on Windows CI
if: runner.os == 'Windows' && matrix.target.BACKEND == 'NO_ASM'
shell: msys2 {0}
run: |
cd constantine
CTT_ASM=0 nimble make_lib --verbose
nimble make_headers --verbose
nimble test_lib --verbose
CTT_ASM=0 nimble test_parallel_no_gmp --verbose

0 comments on commit 8f466be

Please sign in to comment.