-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent generating docs / checking syntax and builds
- Loading branch information
1 parent
93fff0f
commit 17d0b61
Showing
2 changed files
with
82 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 |
---|---|---|
|
@@ -13,36 +13,91 @@ jobs: | |
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get all test, doc and src files that have changed | ||
id: changed-files-yaml | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
files_yaml: | | ||
docs: | ||
- '**.md' | ||
adr: | ||
- adr/** | ||
config: | ||
- certs/** | ||
- deploy/** | ||
- scripts/** | ||
src: | ||
- iris-*/** | ||
# The following steps will only run if any of the src files have changed | ||
- name: Install Dependencies | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
run: sudo apt install protobuf-compiler | ||
|
||
- name: Cache build products | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
uses: Swatinem/[email protected] | ||
with: | ||
# Split the test and bench caches, the have different debug settings | ||
key: "test" | ||
|
||
- name: Install Rust nightly | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
run: rustup toolchain install nightly-2024-07-10 | ||
|
||
- name: Set Rust nightly as default | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
run: rustup default nightly-2024-07-10 | ||
|
||
# Building tests in release mode checks warnings and compiler errors that depend on optimisations | ||
- name: Build Tests | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
run: cargo build --release --all-features --tests | ||
|
||
build-bins: | ||
runs-on: | ||
labels: ubuntu-22.04-64core | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get all test, doc and src files that have changed | ||
id: changed-files-yaml | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
files_yaml: | | ||
docs: | ||
- '**.md' | ||
adr: | ||
- adr/** | ||
config: | ||
- certs/** | ||
- deploy/** | ||
- scripts/** | ||
src: | ||
- iris-*/** | ||
# The following steps will only run if any of the src files have changed | ||
- name: Install Dependencies | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
run: sudo apt install protobuf-compiler | ||
|
||
- name: Cache build products | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
uses: Swatinem/[email protected] | ||
with: | ||
# Split the test and bench caches, they have different debug settings | ||
key: "bench" | ||
|
||
- name: Install Rust nightly | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
run: rustup toolchain install nightly-2024-07-10 | ||
|
||
- name: Set Rust nightly as default | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
run: rustup default nightly-2024-07-10 | ||
|
||
- name: Build All Targets | ||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' | ||
run: cargo build --release --all-features --lib --bins --benches --examples |
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