-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial CI setup and a few tests #21
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
ed8a273
Set up a basic CI build
jberthold ff95f6a
use master as default branch
jberthold 4caa73b
no token at checkout (no need, and not supplied by the CI gods)
jberthold 471fd72
Add integration test directory and move panic_example there, normalis…
jberthold 1487672
Clean up toolchain after build (leave runners' rustup in working cond…
jberthold c073a0f
Pre-clean runner so the rust installation can go through
jberthold c689467
Revert "Pre-clean runner so the rust installation can go through"
jberthold 6833e3c
add tests from mir-semantics run-rs suite
jberthold c0e21c5
move some failing tests (non-deterministic output)
jberthold 64da37c
Do not remove Static allocations, mv panic_example to failing
jberthold 2fde6aa
adjust links to panic_example files
jberthold 0da2714
update expected files for failing tests
jberthold 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: 'Test' | ||
on: | ||
pull_request: | ||
branches: [ "master" ] | ||
push: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
|
||
integration-tests: | ||
name: "Integration tests" | ||
runs-on: [self-hosted, linux, normal] | ||
steps: | ||
- name: 'Check out code' | ||
uses: actions/checkout@v4 | ||
with: | ||
# Check out pull request HEAD instead of merge commit. | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
submodules: recursive | ||
|
||
- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409 | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly-2024-08-28 | ||
|
||
- name: 'Set up tree for rust dependency' | ||
run: make setup | ||
|
||
- name: 'Cache smir_pretty and rustc' | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: | | ||
. | ||
deps/rust/src | ||
cache-directories: | | ||
target | ||
deps/rust/src/build | ||
deps/rust/src/target | ||
|
||
- name: 'Build smir_pretty and its rustc dependency' | ||
run: | # rustc bootstrap checks this and refuses stage 1 in "CI" | ||
export GITHUB_ACTIONS="in denial" && \ | ||
echo "GITHUB_ACTIONS = ${GITHUB_ACTIONS}" && \ | ||
make build_all | ||
|
||
- name: 'Run smir integration tests' | ||
run: | | ||
make integration-test | ||
|
||
- name: 'Clean up toolchain' | ||
if: always() | ||
run: | | ||
make rustup-clear-toolchain | ||
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 @@ | ||
tests/integration/failing/panic_example.rs |
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 @@ | ||
tests/integration/failing/panic_example.smir.json.expected |
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,5 @@ | ||
fn main() { | ||
let a = [1, 2, 3, 4]; | ||
|
||
assert!(a == [1, 2, 3, 4]); | ||
} |
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.
This is important, otherwise the build will leave a dangling toolchain behind that
rustup
stumbles upon during setup. I opened a ticket for this againstdtolnay/rust-toolchain@
.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.
Looks like a solution is already merged @jberthold