-
Notifications
You must be signed in to change notification settings - Fork 101
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
Adjust GitHub Actions for Ubuntu 24.04. #297
Open
PiotrSikora
wants to merge
5
commits into
proxy-wasm:main
Choose a base branch
from
PiotrSikora:ubuntu-24.02
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ff10d71
Adjust GitHub Actions for Ubuntu 24.04.
PiotrSikora 0ef4ce6
review: rename "Install dependencies" to "Install Rustup".
PiotrSikora ed8d375
review: include examples in audit and outdated jobs.
PiotrSikora 24d41b9
review: split install/exec steps in licenses and bazel jobs.
PiotrSikora dca36d7
review: pin tools to specific versions.
PiotrSikora 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 @@ | ||
-P ubuntu-24.04=catthehacker/ubuntu:act-24.04 |
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 |
---|---|---|
|
@@ -30,7 +30,7 @@ on: | |
jobs: | ||
|
||
licenses: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -46,14 +46,17 @@ jobs: | |
~/go/pkg/mod | ||
key: licenses-${{ hashFiles('.github/workflows/rust.yml') }} | ||
|
||
- name: Check licenses | ||
- name: Install dependencies | ||
run: | | ||
go install github.com/google/addlicense@latest | ||
go install github.com/google/addlicense@v1.1.1 | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
|
||
- name: Check licenses | ||
run: | | ||
addlicense -check -ignore "bazel/cargo/remote/**" . | ||
|
||
bazel: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -73,12 +76,13 @@ jobs: | |
~/.cargo/bin | ||
~/.cargo/registry | ||
~/go/pkg/mod | ||
key: bazel-${{ hashFiles('BUILD', 'WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.Bazel.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }} | ||
key: bazel-${{ hashFiles('.github/workflows/rust.yml', 'BUILD', 'WORKSPACE', '.bazelrc', '.bazelversion', 'bazel/cargo/Cargo.Bazel.lock', 'bazel/dependencies.bzl', 'bazel/repositories.bzl') }} | ||
|
||
- name: Install dependencies | ||
if: ${{ env.ACT }} | ||
run: | | ||
go install github.com/bazelbuild/[email protected] | ||
go install github.com/bazelbuild/[email protected] | ||
go install github.com/bazelbuild/buildtools/[email protected] | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
|
||
- name: Build (wasm32-unknown-unknown) | ||
run: bazelisk --noworkspace_rc build --noenable_bzlmod --platforms=@rules_rust//rust/platform:wasm //... | ||
|
@@ -88,8 +92,6 @@ jobs: | |
|
||
- name: Format (buildifier) | ||
run: | | ||
go install github.com/bazelbuild/buildtools/buildifier@latest | ||
export PATH=$PATH:$(go env GOPATH)/bin | ||
buildifier -mode=check -r . | ||
|
||
- name: Format (rules_rust) | ||
|
@@ -98,7 +100,7 @@ jobs: | |
git diff --exit-code | ||
|
||
msrv: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
|
@@ -120,7 +122,7 @@ jobs: | |
**/target | ||
key: msrv-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
- name: Install Rustup | ||
if: ${{ env.ACT }} | ||
run: | | ||
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh | ||
|
@@ -161,7 +163,7 @@ jobs: | |
run: cargo publish --dry-run --target=wasm32-unknown-unknown | ||
|
||
stable: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
|
@@ -183,7 +185,7 @@ jobs: | |
**/target | ||
key: stable-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
- name: Install Rustup | ||
if: ${{ env.ACT }} | ||
run: | | ||
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh | ||
|
@@ -223,7 +225,7 @@ jobs: | |
run: cargo publish --dry-run --target=wasm32-unknown-unknown | ||
|
||
nightly: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
env: | ||
RUSTFLAGS: -D warnings | ||
|
@@ -245,7 +247,7 @@ jobs: | |
**/target | ||
key: nightly-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
- name: Install Rustup | ||
if: ${{ env.ACT }} | ||
run: | | ||
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh | ||
|
@@ -286,13 +288,12 @@ jobs: | |
run: cargo publish --dry-run --target=wasm32-unknown-unknown | ||
|
||
outdated: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
|
@@ -302,9 +303,9 @@ jobs: | |
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
key: outdated-${{ hashFiles('Cargo.toml') }} | ||
key: outdated-${{ hashFiles('.github/workflows/rust.yml', 'Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
- name: Install Rustup | ||
if: ${{ env.ACT }} | ||
run: | | ||
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh | ||
|
@@ -313,20 +314,28 @@ jobs: | |
rm rustup-init.sh | ||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
|
||
- name: Run cargo outdated | ||
- name: Install dependencies | ||
run: | | ||
cargo install cargo-outdated --version 0.16.0 | ||
|
||
- name: Run cargo outdated (main) | ||
run: | | ||
# TODO: Switch back to the official version once it supports Cargo lockfile v4. | ||
cargo install --git https://github.com/MonterraByte/cargo-outdated.git --branch cargo-update | ||
cargo outdated --root-deps-only --exit-code 1 | ||
|
||
- name: Run cargo outdated (examples) | ||
run: | | ||
for example in $(find examples -name Cargo.toml); do \ | ||
cd $(dirname $GITHUB_WORKSPACE/$example); \ | ||
cargo outdated --root-deps-only --exit-code 1; \ | ||
done | ||
|
||
audit: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache | ||
if: ${{ env.ACT }} | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
|
@@ -336,26 +345,35 @@ jobs: | |
~/.cargo/bin | ||
~/.cargo/registry | ||
~/.rustup | ||
key: audit-${{ hashFiles('Cargo.toml') }} | ||
key: audit-${{ hashFiles('.github/workflows/rust.yml', 'Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
- name: Install Rustup | ||
if: ${{ env.ACT }} | ||
run: | | ||
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh | ||
chmod +x ./rustup-init.sh | ||
./rustup-init.sh -y | ||
rm rustup-init.sh | ||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
export PATH=$PATH:$HOME/.cargo/bin | ||
cargo install cargo-audit | ||
|
||
- name: Run cargo audit | ||
- name: Install dependencies | ||
run: | | ||
cargo install cargo-audit --version 0.21.0 | ||
|
||
- name: Run cargo audit (main) | ||
run: | | ||
cp -p bazel/cargo/Cargo.Bazel.lock Cargo.lock | ||
cargo audit | ||
|
||
- name: Run cargo audit (examples) | ||
run: | | ||
for example in $(find examples -name Cargo.toml); do \ | ||
cd $(dirname $GITHUB_WORKSPACE/$example); \ | ||
cargo audit; \ | ||
done | ||
|
||
examples: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
strategy: | ||
matrix: | ||
|
@@ -391,7 +409,7 @@ jobs: | |
**/target | ||
key: example-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
- name: Install Rustup | ||
if: ${{ env.ACT }} | ||
run: | | ||
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh | ||
|
@@ -417,15 +435,6 @@ jobs: | |
- name: Format (manifest) | ||
run: cargo verify-project | ||
|
||
- name: Run cargo audit | ||
if: ${{ !env.ACT }} | ||
run: cargo audit | ||
|
||
# TODO: Re-enable once cargo outdated supports Cargo lockfile v4. | ||
#- name: Run cargo outdated | ||
# if: ${{ !env.ACT }} | ||
# run: cargo outdated --root-deps-only --exit-code 1 | ||
|
||
- name: Validate Envoy config | ||
run: | | ||
docker run --rm \ | ||
|
@@ -436,7 +445,7 @@ jobs: | |
-c envoy.yaml | ||
|
||
reactors: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
|
||
strategy: | ||
matrix: | ||
|
@@ -472,7 +481,7 @@ jobs: | |
**/target | ||
key: reactor-${{ matrix.example }}-${{ hashFiles('Cargo.toml') }} | ||
|
||
- name: Install dependencies | ||
- name: Install Rustup | ||
if: ${{ env.ACT }} | ||
run: | | ||
curl -OL https://static.rust-lang.org/rustup/rustup-init.sh | ||
|
@@ -505,15 +514,6 @@ jobs: | |
- name: Format (manifest) | ||
run: cargo verify-project | ||
|
||
- name: Run cargo audit | ||
if: ${{ !env.ACT }} | ||
run: cargo audit | ||
|
||
# TODO: Re-enable once cargo outdated supports Cargo lockfile v4. | ||
#- name: Run cargo outdated | ||
# if: ${{ !env.ACT }} | ||
# run: cargo outdated --root-deps-only --exit-code 1 | ||
|
||
- name: Rename .wasm to match expected filename | ||
run: | | ||
cd target/wasm32-wasip1/release | ||
|
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.
It looks like this PR removes auditing for both examples + reactors (though keeps the SDK itself
cargo audit
ed). Is that intended? If so, could you leave a comment as to express this happened and indicate that it is unnecessary?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.
It's the same reasoning as to why they were excluded in local tests in #280 (i.e. the cost of building those tools doesn't provide too much value in examples, so it's not worth building them if they're not pre-installed as in full
ubuntu-22.04
images on GitHub Actions).With that in mind, I moved them to the
audit
andoutdated
jobs, since we build those tools for the SDK already.