ci: fix a few actions (#1583)

A few small things:

- Tweak timeouts
- Disable audit workflow as codecov mostly handles it now
- Fix mock check in nightly
This commit is contained in:
Clement Tsang 2024-09-04 22:08:01 -04:00 committed by GitHub
parent c9a99886a5
commit 6c42770b5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 71 deletions

View file

@ -1,35 +0,0 @@
# A routine check to see if there are any Rust-specific security vulnerabilities in the repo we should be aware of.
name: audit
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
jobs:
audit:
timeout-minutes: 18
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: stable
- name: Enable Rust cache
uses: Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609 # 2.7.3
with:
cache-targets: false
cache-all-crates: true
cache-on-failure: true
- name: Install cargo-audit
run: |
cargo install cargo-audit --locked
rm -rf ~/.cargo/registry || echo "no registry to delete"
- uses: rustsec/audit-check@dd51754d4e59da7395a4cd9b593f0ff2d61a9b95 # v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -38,13 +38,15 @@ jobs:
name: "Build binaries" name: "Build binaries"
runs-on: ${{ matrix.info.os }} runs-on: ${{ matrix.info.os }}
container: ${{ matrix.info.container }} container: ${{ matrix.info.container }}
timeout-minutes: 30 timeout-minutes: 10
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
info: info:
# ======= Supported targets ======= # ======= Supported targets =======
# Linux (x86-64, x86, aarch64) # Linux (x86-64, x86, aarch64)
#
# TODO: In the future, when ARM runners are available on github, switch ARM targets off of cross.
- { - {
os: "ubuntu-20.04", os: "ubuntu-20.04",
target: "x86_64-unknown-linux-gnu", target: "x86_64-unknown-linux-gnu",
@ -228,7 +230,7 @@ jobs:
build-msi: build-msi:
name: "Build MSI installer" name: "Build MSI installer"
runs-on: "windows-2019" runs-on: "windows-2019"
timeout-minutes: 30 timeout-minutes: 10
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@ -276,34 +278,10 @@ jobs:
name: "release-build-msi" name: "release-build-msi"
path: release path: release
# build-vm:
# name: "Build using VMs"
# runs-on: "ubuntu-latest"
# timeout-minutes: 30
# strategy:
# fail-fast: false
# matrix:
# info:
# - {
# type: "freebsd",
# os_release: "14.1",
# target: "x86_64-unknown-freebsd",
# }
# - {
# type: "freebsd",
# os_release: "13.3",
# target: "x86_64-unknown-freebsd",
# }
# steps:
# - name: Checkout repository
# uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# with:
# fetch-depth: 1
build-cirrus: build-cirrus:
name: "Build using Cirrus CI" name: "Build using Cirrus CI"
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
timeout-minutes: 30 timeout-minutes: 10
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@ -341,10 +319,11 @@ jobs:
build-deb: build-deb:
name: "Build .deb software packages" name: "Build .deb software packages"
runs-on: "ubuntu-20.04" runs-on: "ubuntu-20.04"
timeout-minutes: 30 timeout-minutes: 10
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
# TODO: In the future, when ARM runners are available on github, switch ARM targets off of cross.
info: info:
- { target: "x86_64-unknown-linux-gnu", dpkg: amd64 } - { target: "x86_64-unknown-linux-gnu", dpkg: amd64 }
- { target: "x86_64-unknown-linux-musl", cross: true, dpkg: amd64 } - { target: "x86_64-unknown-linux-musl", cross: true, dpkg: amd64 }
@ -469,7 +448,7 @@ jobs:
name: "Build .rpm software packages" name: "Build .rpm software packages"
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/clementtsang/almalinux-8 container: ghcr.io/clementtsang/almalinux-8
timeout-minutes: 30 timeout-minutes: 10
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View file

@ -57,12 +57,12 @@ jobs:
# Runs rustfmt + tests + clippy on the main supported platforms. # Runs rustfmt + tests + clippy on the main supported platforms.
# #
# Note that m1 macOS is tested via CirrusCI. # TODO: In the future, when ARM runners are available on github, switch ARM targets off of cross.
supported: supported:
needs: pre-job needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }} if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.info.os }} runs-on: ${{ matrix.info.os }}
timeout-minutes: 18 timeout-minutes: 10
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -143,7 +143,7 @@ jobs:
needs: pre-job needs: pre-job
runs-on: ${{ matrix.info.os }} runs-on: ${{ matrix.info.os }}
if: ${{ needs.pre-job.outputs.should_skip != 'true' }} if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
timeout-minutes: 20 timeout-minutes: 10
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -292,7 +292,7 @@ jobs:
name: "Test using VMs" name: "Test using VMs"
needs: pre-job needs: pre-job
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
timeout-minutes: 30 timeout-minutes: 15
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View file

@ -37,7 +37,7 @@ jobs:
needs: pre-job needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }} if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.info.os }} runs-on: ${{ matrix.info.os }}
timeout-minutes: 18 timeout-minutes: 10
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View file

@ -41,10 +41,9 @@ jobs:
steps: steps:
- name: Check if mock - name: Check if mock
run: | run: |
echo "${{ github.event.inputs.isMock }}";
if [[ -z "${{ github.event.inputs.isMock }}" ]]; then if [[ -z "${{ github.event.inputs.isMock }}" ]]; then
echo "This is a scheduled nightly run." echo "This is a scheduled nightly run."
elif [[ ${{ github.event.inputs.isMock }} == true ]]; then elif [[ "${{ github.event.inputs.isMock }}" == true ]]; then
echo "This is a mock run." echo "This is a mock run."
else else
echo "This is NOT a mock run. Watch for the generated files!" echo "This is NOT a mock run. Watch for the generated files!"