This repository has been archived by the owner on Dec 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
Fix #178: Make MNT{4,6}-753, cp6_782 tests run conditionally #179
Merged
Merged
Changes from 23 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
fa07c81
178: make ci conditional for mnt4_753, mnt6_753
z-tech d6091ce
test run
z-tech 3fd0ebf
take 3
z-tech 5929097
sanity check
z-tech 1f3e253
sanity check 2
z-tech a8a23f8
sanity check 3
z-tech c2c0f77
check long tests section
z-tech d9b4347
test should run both tests
z-tech 566d101
back to original structure
z-tech 1321fdb
sanity
z-tech 0134ab4
fix step id
z-tech 6fa2afd
dep update check
z-tech 268af7b
path required
z-tech b1aecc0
first go, no cache, check second
z-tech b5c3f1d
sanity
z-tech 53babfb
sanity
z-tech 05ff1a8
sanity 2
z-tech 3801e99
sanity 3 should run on no cache hit
z-tech f7312a7
sanity 4 should run on no cache hit
z-tech 5f90970
sanity 5 should run on no cache hit
z-tech 4baeecf
test ensemble
z-tech 61b197a
test ensemble 2
z-tech 7ddd1be
cp6_782 conditional
z-tech f008023
update all cache invocations to v3
z-tech a7f1e58
share dependencies cache accross entire workspace
z-tech 6298f4a
test second run
z-tech 142be10
second run works as expected
z-tech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -104,6 +104,7 @@ jobs: | |
- dir: curve-constraint-tests/ | ||
- dir: mnt4_753/ | ||
- dir: mnt6_753/ | ||
- dir: cp6_782/ | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
@@ -115,27 +116,109 @@ jobs: | |
test-mnt4-753: | ||
name: Test (mnt4_753/) | ||
runs-on: macos-latest | ||
needs: [directories] # Waits for the directory listing job | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Run tests | ||
|
||
- name: Check if source code updated | ||
uses: dorny/[email protected] | ||
id: check-diff | ||
with: | ||
filters: | | ||
mnt4_753_is_updated: | ||
- 'mnt4_753/**' | ||
|
||
- name: Generate lockfile | ||
run: cargo generate-lockfile | ||
|
||
- name: Check if deps updated | ||
id: deps-updated | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: mnt4_753-deps-updated-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Conditionally run the tests | ||
# if source code updated OR dependencies updated | ||
if: ${{ steps.check-diff.outputs.mnt4_753_is_updated == 'true' || steps.deps-updated.outputs.cache-hit != 'true' }} | ||
run: | | ||
cd mnt4_753/ | ||
cargo test --all-features | ||
|
||
test-mnt6-753: | ||
name: Test (mnt6_753/) | ||
runs-on: macos-latest | ||
needs: [directories] # Waits for the directory listing job | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Run tests | ||
|
||
- name: Check if source code updated | ||
uses: dorny/[email protected] | ||
id: check-diff | ||
with: | ||
filters: | | ||
mnt6_753_is_updated: | ||
- 'mnt6_753/**' | ||
|
||
- name: Generate lockfile | ||
run: cargo generate-lockfile | ||
|
||
- name: Check if deps updated | ||
id: deps-updated | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: mnt6_753-deps-updated-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Conditionally run the tests | ||
# if source code updated OR dependencies updated | ||
if: ${{ steps.check-diff.outputs.mnt6_753_is_updated == 'true' || steps.deps-updated.outputs.cache-hit != 'true' }} | ||
run: | | ||
cd mnt6_753/ | ||
cargo test --all-features | ||
|
||
test-cp6_782: | ||
name: Test (cp6_782/) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check if source code updated | ||
uses: dorny/[email protected] | ||
id: check-diff | ||
with: | ||
filters: | | ||
cp6_782_is_updated: | ||
- 'cp6_782/**' | ||
|
||
- name: Generate lockfile | ||
run: cargo generate-lockfile | ||
|
||
- name: Check if deps updated | ||
id: deps-updated | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: cp6_782-deps-updated-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Conditionally run the tests | ||
# if source code updated OR dependencies updated | ||
if: ${{ steps.check-diff.outputs.cp6_782_is_updated == 'true' || steps.deps-updated.outputs.cache-hit != 'true' }} | ||
run: | | ||
cd cp6_782/ | ||
cargo test --all-features | ||
|
||
|
||
docs: | ||
name: Check Documentation | ||
runs-on: ubuntu-latest | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can avoid the
mnt4_753-deps-updated-
prefix, as theCargo.lock
file is shared across the entire workspace. So we'd be unnecessarily creating an additional cache entry and possibly causing false cache misses if we use this key. Ditto for the other curves.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That last change didn't result in "cache hits" like I expected...
Does
cargo generate-lockfile
need to be added before the cache invocation at line 53?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second run seems to work as expected. I'll wait for you to let me know when to merge.