-
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
19 additions
and
14 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 |
---|---|---|
|
@@ -22,29 +22,34 @@ env: | |
CLICOLOR: 1 | ||
MDBOOK_VERSION: 0.4.37 | ||
LINKCHECK_VERSION: 0.7.7 | ||
RUST_VERSION: 1.78.0 | ||
RUST_LATEST_VERSION: 1.78.0 | ||
|
||
jobs: | ||
unit_test: | ||
name: Unit test on ${{ matrix.os }} [${{ matrix.mode }}] | ||
name: Unit test [${{ matrix.mode }}-rust-${{ matrix.rust }}-${{ matrix.os }}] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
# - macos-14 | ||
mode: [debug, release] | ||
- macos-14 | ||
rust: | ||
# Oldest supported version of rust | ||
- 1.77.2 | ||
- 1.78.0 | ||
mode: | ||
- debug | ||
|
||
include: | ||
- mode: 'debug' | ||
mode_option: '' | ||
- mode: 'release' | ||
mode_option: '--release' | ||
# Add a release build on linux with the latest version of rust | ||
- os: ubuntu-22.04 | ||
rust: 1.78.0 | ||
mode: release | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- name: Update rust | ||
run: rustup install "$RUST_VERSION" --no-self-update && rustup default "${RUST_VERSION}" | ||
run: rustup install ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} | ||
- name: Check rust installation | ||
run: rustc -vV | ||
- uses: actions/[email protected] | ||
|
@@ -54,19 +59,19 @@ jobs: | |
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-rust-${{ env.RUST_VERSION }}-cargo-unit-test-${{ matrix.mode }}-${{ hashFiles('**/Cargo.lock') }} | ||
key: ${{ runner.os }}-rust-${{ matrix.rust }}-cargo-unit-test-${{ matrix.mode }}-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Build | ||
run: cargo build ${{ matrix.mode_option }} --verbose | ||
run: cargo build ${{ matrix.mode == 'release' && '--release' || '' }} --verbose | ||
- name: Run tests | ||
run: cargo test ${{ matrix.mode_option }} --verbose | ||
run: cargo test ${{ matrix.mode == 'release' && '--release' || '' }} --verbose | ||
|
||
execute_tutorials: | ||
name: Execute tutorials | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Update rust | ||
run: rustup install "$RUST_VERSION" --no-self-update && rustup default "${RUST_VERSION}" | ||
run: rustup install "$RUST_LATEST_VERSION" --no-self-update && rustup default "$RUST_LATEST_VERSION" | ||
- name: Check rust installation | ||
run: rustc -vV | ||
- uses: actions/[email protected] | ||
|
@@ -76,7 +81,7 @@ jobs: | |
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-rust-${{ env.RUST_VERSION }}-cargo-execute-tutorials-${{ hashFiles('**/Cargo.lock') }} | ||
key: ${{ runner.os }}-rust-${{ env.RUST_LATEST_VERSION }}-cargo-execute-tutorials-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Install | ||
run: cargo install --path . --locked --verbose | ||
- name: Run hello.sh | ||
|