ci: Build examples #3
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: Rust | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build-library: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # install nix | |
| - uses: cachix/install-nix-action@v30 | |
| - uses: cachix/cachix-action@v15 | |
| with: | |
| name: devenv | |
| extraPullNames: nix-community | |
| - name: Install devenv.sh | |
| run: nix profile install nixpkgs#devenv | |
| - name: Build | |
| run: devenv shell cargo build --verbose | |
| - name: Run tests | |
| run: devenv shell cargo test --verbose | |
| build-examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # install nix | |
| - uses: cachix/install-nix-action@v30 | |
| - uses: cachix/cachix-action@v15 | |
| with: | |
| name: devenv | |
| extraPullNames: nix-community | |
| - name: Install devenv.sh | |
| run: nix profile install nixpkgs#devenv | |
| - name: Build | |
| working-directory: examples/yolo-cli | |
| run: devenv shell cargo build --verbose |