Add run_program function #26
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: linux-16core | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-build-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-build- | |
| ${{ runner.os }}-cargo | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| mdBook/target | |
| key: ${{ runner.os }}-cargo-mdBook-${{ hashFiles('mdBook/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-mdBook- | |
| ${{ runner.os }}-cargo- | |
| # Checks are ordered from fastest to slowest so your build fails quickly on invalid PRs | |
| # We do everything in release mode so tests run quickly and steps cache each other. | |
| # Check the submitted change meets style guidelines | |
| - name: generate lfs file list | |
| run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id | |
| - name: restore lfs cache | |
| uses: actions/cache@v3 | |
| id: lfs-cache | |
| with: | |
| path: .git/lfs | |
| key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1 | |
| - name: pull lfs files | |
| run: git lfs pull | |
| - name: Print cargo version | |
| run: cargo --version | |
| - name: Print clang version | |
| run: clang --version | |
| - name: Cargo Format | |
| run: cargo fmt --check | |
| # Check that common feature permutations compile | |
| - name: Core compile check | |
| run: cargo check --release -vv | |
| - name: Full compile check | |
| run: cargo check --release | |
| # Build and run the tests | |
| - name: Build and run tests | |
| run: cargo test --workspace --release | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-clippy- | |
| ${{ runner.os }}-cargo- | |
| # Check the submitted change passes the clippy linter | |
| - name: Cargo clippy | |
| run: cargo clippy --release --all-targets -- --deny warnings | |
| api_docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: 'recursive' | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cargo/bin/ | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ runner.os }}-cargo-doc-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-doc- | |
| ${{ runner.os }}-cargo- | |
| # Check the full documentation builds, links work, etc. | |
| - name: Cargo doc | |
| env: | |
| RUSTDOCFLAGS: -D warnings | |
| run: cargo doc --release --no-deps |