Skip to content
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

ci: Remove optional success for beta/nightly in dev.yml #98

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 22 additions & 45 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,10 @@ jobs:
fail-fast: false
matrix:
rust:
- toolchain: "stable"
optional: false
- toolchain: "beta"
optional: true
- toolchain: "nightly"
optional: true
continue-on-error: ${{ matrix.rust.optional }}
- "stable"
- "beta"
- "nightly"
name: "Developer build (Rust ${{ matrix.rust }})"
runs-on: "lab"
timeout-minutes: 45
steps:
Expand All @@ -83,7 +80,7 @@ jobs:
- name: "install rust"
uses: "dtolnay/rust-toolchain@stable"
with:
toolchain: "${{ matrix.rust.toolchain }}"
toolchain: "${{ matrix.rust }}"
targets: "x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl"
- name: "Checkout"
uses: "actions/checkout@v4"
Expand Down Expand Up @@ -127,55 +124,48 @@ jobs:
for commit in $COMMITS ; do
git checkout $commit || exit 1
printf "::group::Build commit %s\n" "$(git log --oneline --no-decorate -n 1)"
(just debug=true cargo +${{matrix.rust.toolchain}} build --locked --profile=dev --target=x86_64-unknown-linux-gnu) || exit 1
(just debug=true cargo +${{matrix.rust}} build --locked --profile=dev --target=x86_64-unknown-linux-gnu) || exit 1
printf "::endgroup::\n"
done
printf "::notice::HEAD remains at %s\n" "$(git log --oneline --no-decorate -n 1)"
continue-on-error: ${{ matrix.rust.optional }}

# At this stage, for Pull Requests, we're back to the HEAD of the branch,
# start running tests for different configurations.
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=dev target=x86_64-unknown-linux-gnu"
- name: "tests: rust ${{ matrix.rust }} profile=dev target=x86_64-unknown-linux-gnu"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust.toolchain}} profile=dev target=x86_64-unknown-linux-gnu test
just debug=true rust=${{matrix.rust.toolchain}} profile=dev target=x86_64-unknown-linux-gnu report
continue-on-error: ${{ matrix.rust.optional }}
just debug=true rust=${{matrix.rust}} profile=dev target=x86_64-unknown-linux-gnu test
just debug=true rust=${{matrix.rust}} profile=dev target=x86_64-unknown-linux-gnu report

- run: |
just cargo +${{matrix.rust.toolchain}} build --locked --profile=dev --target=x86_64-unknown-linux-musl
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=dev target=x86_64-unknown-linux-musl"
just cargo +${{matrix.rust}} build --locked --profile=dev --target=x86_64-unknown-linux-musl
- name: "tests: rust ${{ matrix.rust }} profile=dev target=x86_64-unknown-linux-musl"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust.toolchain}} profile=dev target=x86_64-unknown-linux-musl test
just debug=true rust=${{matrix.rust.toolchain}} profile=dev target=x86_64-unknown-linux-musl report
continue-on-error: ${{ matrix.rust.optional }}
just debug=true rust=${{matrix.rust}} profile=dev target=x86_64-unknown-linux-musl test
just debug=true rust=${{matrix.rust}} profile=dev target=x86_64-unknown-linux-musl report

- run: |
just debug=true cargo +${{matrix.rust.toolchain}} build --locked --profile=release --target=x86_64-unknown-linux-gnu
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=release target=x86_64-unknown-linux-gnu"
just debug=true cargo +${{matrix.rust}} build --locked --profile=release --target=x86_64-unknown-linux-gnu
- name: "tests: rust ${{ matrix.rust }} profile=release target=x86_64-unknown-linux-gnu"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-gnu test
just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-gnu report
continue-on-error: ${{ matrix.rust.optional }}
just debug=true rust=${{matrix.rust}} profile=release target=x86_64-unknown-linux-gnu test
just debug=true rust=${{matrix.rust}} profile=release target=x86_64-unknown-linux-gnu report

- run: |
just debug=true cargo +${{matrix.rust.toolchain}} build --locked --profile=release --target=x86_64-unknown-linux-musl
continue-on-error: ${{ matrix.rust.optional }}
- name: "tests: rust ${{ matrix.rust.toolchain }} profile=release target=x86_64-unknown-linux-musl"
just debug=true cargo +${{matrix.rust}} build --locked --profile=release --target=x86_64-unknown-linux-musl
- name: "tests: rust ${{ matrix.rust }} profile=release target=x86_64-unknown-linux-musl"
run: |
export GITHUB_STEP_SUMMARY
just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-musl test
just debug=true rust=${{matrix.rust.toolchain}} profile=release target=x86_64-unknown-linux-musl report
continue-on-error: ${{ matrix.rust.optional }}
just debug=true rust=${{matrix.rust}} profile=release target=x86_64-unknown-linux-musl test
just debug=true rust=${{matrix.rust}} profile=release target=x86_64-unknown-linux-musl report

- uses: "actions/upload-artifact@v4"
if: ${{ always() }}
with:
name: "test-results-${{ matrix.rust.toolchain }}"
name: "test-results-${{ matrix.rust }}"
path: "target/nextest/"

- name: "Setup tmate session for debug"
Expand All @@ -184,16 +174,3 @@ jobs:
timeout-minutes: 60
with:
limit-access-to-actor: true

summary:
name: "summary"
runs-on: "ubuntu-latest"
needs:
- build
if: ${{ always() && needs.build.result != 'skipped' }}
steps:
- name: "Flag any build matrix failures"
if: ${{ needs.build.result != 'success' }}
run: |
>&2 echo "A critical step failed!"
exit 1
21 changes: 2 additions & 19 deletions .github/workflows/sterile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
rust:
- "stable"
- "nightly"
name: "Sterile test run (Rust ${{ matrix.rust }})"
steps:
- name: "login to ghcr.io"
uses: "docker/login-action@v3"
Expand Down Expand Up @@ -178,6 +179,7 @@ jobs:
rust:
- "stable"
- "nightly"
name: "Push containers (Rust ${{ matrix.rust }})"
steps:
- name: "login to ghcr.io"
uses: "docker/login-action@v3"
Expand Down Expand Up @@ -226,22 +228,3 @@ jobs:
timeout-minutes: 60
with:
limit-access-to-actor: true

summary:
name: "summary"
runs-on: "ubuntu-latest"
needs:
- test
- push
if: ${{ always() && needs.test.result != 'skipped' && needs.push.result != 'skipped' }}
steps:
- name: "Flag any test failures"
if: ${{ needs.test.result != 'success' }}
run: |
>&2 echo "One or more required tests failed"
exit 1
- name: "Flag any push failures"
if: ${{ needs.push.result != 'success' }}
run: |
>&2 echo "One or more required pushes failed"
exit 1
Loading