-
Notifications
You must be signed in to change notification settings - Fork 268
Move Linux CI from Azure Pipelines to GitHub Actions #1232
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
+81
−68
Merged
Changes from all commits
Commits
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,81 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
|
||
jobs: | ||
test-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: rustup component add rustfmt rustc-dev | ||
# rust-cache very carefully caches toolchains and target directories, | ||
# based on the job and toolchain and other factors. See | ||
# https://github.com/Swatinem/rust-cache#cache-details for what gets | ||
# cached, what gets used as part of the key, and what additional handling | ||
# happens to make the cache reliable and smaller. | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: | | ||
sudo apt-get update | ||
sudo apt-get install \ | ||
clang \ | ||
clang-tools \ | ||
cmake \ | ||
curl \ | ||
git \ | ||
gperf \ | ||
libbrotli-dev \ | ||
libclang-dev \ | ||
libgcrypt20 \ | ||
libreadline-dev \ | ||
libidn2-dev \ | ||
libldap2-dev \ | ||
libncurses5-dev \ | ||
libnghttp2-dev \ | ||
libpcre3-dev \ | ||
libpsl-dev \ | ||
librtmp-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
llvm \ | ||
llvm-dev \ | ||
luarocks \ | ||
ninja-build \ | ||
pkg-config \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
python3-wheel \ | ||
rcs \ | ||
strace \ | ||
unzip \ | ||
zlib1g-dev | ||
- name: Provision Python Packages | ||
run: python3 -m pip install -r $GITHUB_WORKSPACE/scripts/requirements.txt | ||
- name: cargo fmt --check | ||
run: | | ||
export RUSTFLAGS="-D warnings" | ||
export RUSTDOCFLAGS="-D warnings" | ||
cargo fmt --check | ||
- name: cargo build --release | ||
run: | | ||
export RUSTFLAGS="-D warnings" | ||
export RUSTDOCFLAGS="-D warnings" | ||
# Don't build with `--all-features` as `--all-features` includes `--features llvm-static`, | ||
# which we don't want to test here (see https://github.com/immunant/c2rust/issues/500). | ||
cargo build --release | ||
- name: cargo test --release --workspace | ||
run: | | ||
export RUSTFLAGS="-D warnings" | ||
export RUSTDOCFLAGS="-D warnings" | ||
cargo test --release --workspace | ||
- name: Test translator | ||
run: | | ||
# `test_translator.py` compiles translated code, | ||
# which has tons of warnings. | ||
# `RUSTFLAGS="-D warnings"` would be inherited by that, | ||
# causing tons of errors, so don't set that. | ||
# `test_translator.py` does not rebuild, | ||
# so changing `RUSTFLAGS` will not trigger a full rebuild. | ||
./scripts/test_translator.py tests/ |
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
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.