-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
name: Cargo Build & Test | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build_and_test: | ||
name: Rust project - latest | ||
runs-on: ubuntu-latest | ||
env: | ||
NIXPKGS_ALLOW_UNFREE: 1 # required to get gurobi | ||
strategy: | ||
matrix: | ||
toolchain: | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: cachix/install-nix-action@v26 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-23.11 | ||
- run: nix-shell --run "rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}" | ||
- run: nix-shell --run "cargo build --verbose" | ||
# TODO: github runner is missing gurobi license required for tests | ||
# - run: nix-shell --run "cargo test --verbose" |