ci on all os #140
This file contains 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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Rust project - ${{ matrix.os }} - ${{ matrix.toolchain }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- beta | |
# - nightly | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install ninja build | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "14.0" | |
- name: Install EnzymeAD | |
run: | | |
git clone https://github.com/EnzymeAD/Enzyme | |
cd Enzyme | |
mkdir build | |
cd build | |
cmake -G Ninja -DLLVM_DIR=${{ env.LLVM_PATH }}/lib/cmake/llvm .. | |
ninja | |
echo "ENZYME_LIB=`pwd`/LLVMEnzyme-14.so" >> $GITHUB_ENV | |
- name: Print LLVM Enzyme Library | |
run: echo $ENZYME_LIB | |
- name: Set up Rust | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose |