-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only run Miri with 1 seed on PRs, but also run Miri on pushes to `main` with 8 seeds. I don't have much experience with GitHub actions but this seems to work. - I PRed this on my fork and merged it. - The push to main ran the Miri job with 8 seeds - The original job from `ci.yml` moved to a new `validation.yml` file which only runs on pushes to `main`. - Then I opened another PR, which ran Miri with only 1 seed. - The job ran for 3m 35s, but most of the build artifacts were already cached. The only issue I see with this is the caching part of the job. The yml sets up these keys: ```yml key: ci-miri-${{ matrix.config.target }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ci-miri-${{ matrix.config.target }}- ``` which are now duplicated to 2 different jobs in 2 completely different workflows. I don't know if that's a problem or not. --------- Co-authored-by: Zicklag <zicklag@katharostech.com>
- Loading branch information
Showing
4 changed files
with
95 additions
and
54 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
This file was deleted.
Oops, something went wrong.
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,54 @@ | ||
name: ⏮️ Pull Requests | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
merge_group: | ||
|
||
jobs: | ||
validate_title: | ||
name: 🕵 Validate Conventional PR Title | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
name: 🔎 Validate Conventional PR Title | ||
if: github.event_name == 'pull_request_target' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
miri_tests: | ||
runs-on: ubuntu-latest | ||
name: 📡 Miri tests ( PR ) | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 🧰 Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y -q \ | ||
libasound2-dev \ | ||
libudev-dev | ||
- name: 🧰 Install Miri | ||
run: | | ||
rustup toolchain install nightly --component miri | ||
rustup override set nightly | ||
cargo miri setup | ||
- name: ♻️ Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
web-target/ | ||
key: ci-miri-${{ matrix.config.target }}-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
ci-miri-${{ matrix.config.target }}- | ||
- name: 📡 Test with Miri | ||
shell: bash | ||
run: "${GITHUB_WORKSPACE}/.github/miri-test.sh" | ||
env: | ||
NUM_SEEDS: 1 |
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,41 @@ | ||
name: 📝 Validation | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
miri_tests: | ||
runs-on: ubuntu-latest | ||
name: 📡 Miri tests | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: 🧰 Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y -q \ | ||
libasound2-dev \ | ||
libudev-dev | ||
- name: 🧰 Install Miri | ||
run: | | ||
rustup toolchain install nightly --component miri | ||
rustup override set nightly | ||
cargo miri setup | ||
- name: ♻️ Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
web-target/ | ||
key: ci-miri-${{ matrix.config.target }}-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: | | ||
ci-miri-${{ matrix.config.target }}- | ||
- name: 📡 Test with Miri | ||
shell: bash | ||
run: "${GITHUB_WORKSPACE}/.github/miri-test.sh" | ||
env: | ||
NUM_SEEDS: 8 |