Update README.md #89
Workflow file for this run
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: Cargo Build & Test | |
on: | |
push: | |
branches: | |
- "*" | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
# Run only on pushes to branches with open PRs | |
if: github.event_name == 'push' && contains(fromJson('["refs/heads/main"]'), github.ref) == false && github.event.repository.pulls != '[]' | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- beta | |
- nightly | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install rust | |
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add rustfmt | |
- name: Install vcpkg build dependencies | |
run: sudo apt-get --assume-yes install nasm | |
- name: Install vcpkg | |
run: cargo install cargo-vcpkg | |
- name: Build vcpkg dependencies | |
run: cargo vcpkg --verbose build | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose |