build #1509
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| push: | |
| pull_request: | |
| schedule: | |
| - cron: "0 18 * * *" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| rustc: stable | |
| - os: ubuntu-latest | |
| rustc: nightly | |
| - os: macos-latest | |
| rustc: stable | |
| - os: windows-latest | |
| rustc: stable | |
| - os: ubuntu-latest | |
| cross: aarch64-unknown-linux-gnu | |
| rustc: stable | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| persist-credentials: false | |
| - name: Install ${{ matrix.rustc }} toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rustc }} | |
| - name: Install valgrind on Linux | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y valgrind | |
| - name: Install cross | |
| if: matrix.cross != '' | |
| uses: taiki-e/setup-cross-toolchain-action@v1 | |
| with: | |
| target: ${{ matrix.cross }} | |
| - name: Build (debug) | |
| run: cargo build -p graviola | |
| - name: Run tests (debug) | |
| run: cargo test | |
| - name: Run tests (debug, --no-default-features) | |
| run: cargo test --no-default-features | |
| - name: Build (release) | |
| run: cargo build -p graviola --release | |
| - name: Run tests (release) | |
| run: env SLOW_TESTS=1 cargo test --release | |
| - name: Artificial CPU feature tests (x86_64) | |
| if: runner.arch == 'X64' | |
| run: | | |
| # test software fallbacks for sha256 and sha512 | |
| env GRAVIOLA_CPU_DISABLE_sha=1 GRAVIOLA_CPU_DISABLE_bmi2=1 cargo test | |
| # test avx2/aesni aes-gcm | |
| env GRAVIOLA_CPU_DISABLE_avx512bw=1 GRAVIOLA_CPU_DISABLE_avx512f=1 GRAVIOLA_CPU_DISABLE_vaes=1 cargo test |