forked from mozilla/neqo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Check CI workflows with
zizmor
(mozilla#2413)
* ci: Check CI workflows with `zizmor` * ci: Enable `zizmor` CI workflow linting And fix the issues. * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Fix * Add tags * Fix * debug * Quotes * Undo debug
- Loading branch information
1 parent
e682ede
commit 12dc9e9
Showing
19 changed files
with
227 additions
and
115 deletions.
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
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
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
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 |
---|---|---|
|
@@ -35,12 +35,12 @@ runs: | |
# | ||
# Also, only enable sscache on our self-hosted runner, because the GitHub cache limit | ||
# is too small for this to be effective there. | ||
if: env.SCCACHE_ENABLED != '1' && runner.environment != 'github-hosted' | ||
if: ${{ env.SCCACHE_ENABLED != '1' && runner.environment != 'github-hosted' }} | ||
uses: mozilla-actions/sccache-action@2e7f9ec7921547d4b46598398ca573513895d0bd # v0.0.4 | ||
|
||
- name: Install build dependencies (Linux) | ||
shell: bash | ||
if: runner.os == 'Linux' && runner.environment == 'github-hosted' | ||
if: ${{ runner.os == 'Linux' && runner.environment == 'github-hosted' }} | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
|
@@ -65,12 +65,14 @@ runs: | |
} >> "$GITHUB_ENV" | ||
- name: Enable sscache | ||
if: runner.environment != 'github-hosted' | ||
if: ${{ runner.environment != 'github-hosted' }} | ||
env: | ||
RUNNER_ENVIRONMENT: ${{ runner.environment }} | ||
shell: bash | ||
run: | | ||
echo "SCCACHE_ENABLED=1" >> "$GITHUB_ENV" | ||
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV" | ||
if [ "${{ runner.environment }}" == "github-hosted" ]; then | ||
if [ "$RUNNER_ENVIRONMENT" == "github-hosted" ]; then | ||
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV" | ||
fi | ||
|
@@ -81,29 +83,30 @@ runs: | |
save-if: ${{ github.ref == 'refs/heads/main' }} # Only cache runs from `main` | ||
|
||
- name: Set up MSVC (Windows) | ||
if: runner.os == 'Windows' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
if: ${{ runner.os == 'Windows' }} | ||
uses: ilammy/msvc-dev-cmd@v1 # zizmor: ignore[unpinned-uses] | ||
# TODO: Would like to pin this, but the Mozilla org allowlist requires "ilammy/msvc-dev-cmd@v1*" | ||
# uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 | ||
|
||
# See https://github.com/ilammy/msvc-dev-cmd#name-conflicts-with-shell-bash | ||
- name: Set up build environment (Windows) | ||
shell: bash | ||
if: runner.os == 'Windows' | ||
if: ${{ runner.os == 'Windows' }} | ||
run: rm /usr/bin/link.exe || true | ||
|
||
- name: Install cargo-quickinstall | ||
shell: bash | ||
if: inputs.tools != '' | ||
if: ${{ inputs.tools != '' }} | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.token }} | ||
# TODO: Unpin cargo-quickinstall once our MSRV is > 1.76 | ||
run: cargo install --locked [email protected] | ||
|
||
- name: Install Rust tools | ||
shell: bash | ||
if: inputs.tools != '' | ||
if: ${{ inputs.tools != '' }} | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.token }} | ||
TOOLS: ${{ inputs.tools }} | ||
# FIXME: See https://github.com/Swatinem/rust-cache/issues/204 for why `--force`. | ||
run: cargo quickinstall --force $(echo ${{ inputs.tools }} | tr -d ",") | ||
run: cargo quickinstall --force $(echo $TOOLS | tr -d ",") |
Oops, something went wrong.