-
Notifications
You must be signed in to change notification settings - Fork 0
Initial CI setup and a few tests #21
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
Merged
Merged
Changes from 4 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 hidden or 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: '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 |
This file contains hidden or 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 hidden or 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/programs/panic_example.rs |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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/programs/panic_example.smir.json.expected |
This file contains hidden or 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,18 @@ | ||
{ allocs: | ||
( [ .allocs[] ] | ||
# sort allocs by their ID | ||
| sort_by(.[0]) | ||
# TODO this should be removed | ||
| map ( select( .[1] | has("Static") | not ) ) | ||
), | ||
functions: | ||
( [ .functions[] ] | ||
# sort functions by their ID (int, first in list) | ||
| sort_by(.[0]) | ||
), | ||
items: | ||
( [ .items[] ] | ||
# sort items by symbol name they refer to | ||
| sort_by(.symbol_name) | ||
) | ||
} |
This file contains hidden or 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,3 @@ | ||
fn main() { | ||
panic!() | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.