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

A few more CI workflow comment and style improvements #1672

Merged
merged 3 commits into from
Nov 13, 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
24 changes: 15 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ jobs:
- uses: actions/checkout@v4
- name: Prerequisites
run: |
prerequisites=(
ca-certificates
curl
gcc # rustc calls gcc to invoke the linker.
libc-dev # rustc, in the toolchain we are using, dynamically links to the system libc.
)
apt-get update
apt-get install --no-install-recommends -y ca-certificates curl gcc libc-dev # gcc is required as OS abstraction
apt-get install --no-install-recommends -y -- "${prerequisites[@]}"
shell: bash
- name: Verify environment is sufficiently minimal for the test
run: |
set -x
Expand Down Expand Up @@ -84,15 +91,14 @@ jobs:
- uses: Swatinem/rust-cache@v2
- name: Setup dependencies (macos)
if: startsWith(matrix.os, 'macos')
run:
brew install tree openssl gnu-sed
run: brew install tree openssl gnu-sed
- name: "cargo check default features"
if: startsWith(matrix.os, 'windows')
run: cargo check --workspace --bins --examples
- uses: taiki-e/install-action@v2
with:
tool: nextest
- name: "Test (nextest)"
- name: Test (nextest)
env:
GIX_TEST_CREATE_ARCHIVES_EVEN_ON_CI: '1'
run: cargo nextest run --workspace --no-fail-fast
Expand Down Expand Up @@ -157,9 +163,9 @@ jobs:
- uses: taiki-e/install-action@v2
with:
tool: cross
- name: "check"
- name: check
run: cross check -p gix --target ${{ matrix.target }}
- name: "Test (unit)"
- name: Test (unit)
# run high-level unit tests that exercise a lot of code while being pure Rust to ease building test binaries.
# TODO: figure out why `git` doesn't pick up environment configuration so build scripts fail when using `-p gix`.
run: cross test -p gix-hashtable --target ${{ matrix.target }}
Expand Down Expand Up @@ -275,7 +281,7 @@ jobs:

defaults:
run:
shell: bash
shell: bash # Use bash even on Windows, if we ever reenable windows-latest for testing.

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -327,7 +333,7 @@ jobs:
- name: Each job must block PRs or be declared not to
run: |
sort -m blocking-jobs.txt expected-nonblocking-jobs.txt |
diff --color=always -U1000 -- - all-jobs.txt
diff --color=always -U1000 - all-jobs.txt

# Dummy job to have a stable name for the "all tests pass" requirement
tests-pass:
Expand All @@ -349,7 +355,7 @@ jobs:

steps:
- name: Fail if ANY dependency has failed or cancelled
if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')"
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1
- name: OK
run: exit 0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
workflow_dispatch:

permissions:
contents: read # Set more permissively in jobs that need `write`.
contents: read # This is set more permissively in jobs that need `write`.

defaults:
run:
Expand Down
Loading