-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Continuous integration runs in two simultaneous jobs. One for make ci, which runs cargo build, test, fmt and clippy. The other, make image, builds the updater container image. Caching for make ci speeds up the build time from over 10 minutes to just a minute or two. cargo install cargo-deny took five minutes on its own before caching CARGO_HOME. Caching for the make image build required some hacks and ended up being slower that running with no caching (due to all the compressing and decompressing of docker image layers, CPU-bound), so no caching there.
- Loading branch information
Showing
2 changed files
with
75 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,55 @@ | ||
name: Updater CI | ||
on: | ||
pull_request: | ||
branches: [*] | ||
push: | ||
branches: [develop] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cargo Home Cache | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cargo-home | ||
with: | ||
path: /usr/share/rust/.cargo | ||
key: ${{ runner.os }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo') }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo-deny') }}-${{ hashFiles('Makefile') }}-${{ hashFiles('updater/Cargo.lock') }}-${{ hashFiles('integ/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo') }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo-deny') }}-${{ hashFiles('Makefile') }}-${{ hashFiles('updater/Cargo.lock') }}- | ||
${{ runner.os }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo') }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo-deny') }}-${{ hashFiles('Makefile') }}- | ||
${{ runner.os }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo') }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo-deny') }}- | ||
${{ runner.os }}-${{ hashFiles('/usr/share/rust/.cargo/bin/cargo') }}- | ||
- name: Updater Build Cache | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: updater-target | ||
with: | ||
path: updater/target | ||
key: ${{ runner.os }}-${{ hashFiles('updater/Cargo.toml') }}-${{ hashFiles('updater/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ hashFiles('updater/Cargo.toml') }}- | ||
${{ runner.os }}- | ||
- name: Integ Build Cache | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: integ-target | ||
with: | ||
path: integ/target | ||
key: ${{ runner.os }}-${{ hashFiles('integ/Cargo.toml') }}-${{ hashFiles('integ/Cargo.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ hashFiles('integ/Cargo.toml') }}- | ||
${{ runner.os }}- | ||
- run: rustup update stable && cargo install cargo-deny | ||
- run: make ci | ||
|
||
image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: make image |
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