Skip to content

Commit

Permalink
GitHub CI: Update and rename actions
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Jul 26, 2023
1 parent d86ce12 commit 07f6778
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow

name: continuous-integration
name: build-and-test

permissions:
contents: read
Expand All @@ -22,23 +22,20 @@ env:
RUST_BACKTRACE: short

jobs:
continuous-integration:
name: Building workspace projects and running tests
build-and-test:
runs-on: ${{ matrix.runner_os }}
strategy:
matrix:
target:
- x86_64-unknown-linux-musl
include:
- target: x86_64-unknown-linux-musl
runner_os: ubuntu-latest
- target: x86_64-apple-darwin
- target: aarch64-apple-darwin
runner_os: macos-latest
- target: x86_64-pc-windows-msvc
runner_os: windows-latest
- target: x86_64-unknown-linux-musl
runner_os: ubuntu-latest

steps:
- name: Install dependencies for `musl libc` on Linux
- name: Install dependencies for musl libc
if: matrix.target == 'x86_64-unknown-linux-musl'
run: |
sudo apt -y install musl-tools
Expand All @@ -60,14 +57,16 @@ jobs:
with:
targets: ${{ matrix.target }}, wasm32-unknown-unknown

# Checkout the repository before the remaining steps that depend on it.
# All preceding steps are independent of the repository contents.
- name: Check out repository
uses: actions/checkout@v3

- name: Cache Rust toolchain and build artifacts
uses: Swatinem/rust-cache@v2
with:
# Distinguished by the action name to avoid sharing across different actions!
shared-key: "continuous-integration"
# Distinguished by the action name to avoid sharing between different actions.
shared-key: "build-and-test"

- name: Check aoide-core
run: |
Expand Down Expand Up @@ -141,14 +140,10 @@ jobs:
run: |
cargo check --locked --all-targets --all-features --manifest-path webcli/Cargo.toml
- name: Build tests with default features
run: |
cargo test --locked --workspace --all-targets --no-run
- name: Run tests with default features
- name: Build tests with all features enabled
run: |
cargo test --locked --workspace --all-targets -- --nocapture --quiet
cargo test --locked --workspace --all-targets --all-features --no-run
- name: Build workspace with profile `production` and default features
- name: Run tests with all features enabled
run: |
cargo build --locked --workspace --all-targets --profile production
cargo test --locked --workspace --all-targets --all-features -- --nocapture --quiet
4 changes: 3 additions & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ jobs:
with:
components: clippy, rustfmt

# Checkout the repository before the remaining steps that depend on it.
# All preceding steps are independent of the repository contents.
- name: Check out repository
uses: actions/checkout@v3

- name: Cache Rust toolchain and build artifacts
uses: Swatinem/rust-cache@v2
with:
# Distinguished by the action name to avoid sharing across different actions!
# Distinguished by the action name to avoid sharing between different actions.
shared-key: "pre-commit"

- name: Detect code style issues (push)
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,20 @@ jobs:
run: |
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install native Rust toolchain
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

# Checkout the repository before the remaining steps that depend on it.
# All preceding steps are independent of the repository contents.
- name: Check out repository
uses: actions/checkout@v3

- name: Cache Rust toolchain and build artifacts
uses: Swatinem/rust-cache@v2
with:
# Distinguished by the action name to avoid sharing across different actions!
# Distinguished by the action name to avoid sharing between different actions.
shared-key: "pre-release"

- name: Build artifact
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/security-audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ jobs:
run: |
cargo install cargo-audit
# Checkout the repository before the remaining steps that depend on it.
# All preceding steps are independent of the repository contents.
- uses: actions/checkout@v3

- name: Cache Rust toolchain and build artifacts
uses: Swatinem/rust-cache@v2
with:
# Distinguished by the action name to avoid sharing across different actions!
# Distinguished by the action name to avoid sharing between different actions.
shared-key: "security-audit"

- name: Run security audit
Expand Down

0 comments on commit 07f6778

Please sign in to comment.