Fix cargo deny
checks, update Docker distributions
#5359
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
# 🐻❄️📦 charted-server: Free, open source, and reliable Helm Chart registry made in Rust | |
# Copyright 2022-2025 Noelware, LLC. <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: CI Pipeline | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- 'issues/gh-**' | |
- 'feat/**' | |
- main | |
paths-ignore: | |
- '.github/**' | |
- '.vscode/**' | |
- 'assets/**' | |
- 'distribution/**' | |
- 'docs/**' | |
- '.*ignore' | |
- '**.md' | |
- .envrc | |
- .noeldoc | |
- .prettierrc.json | |
- rustfmt.toml | |
- taplo.toml | |
- LICENSE | |
- renovate.json | |
pull_request: | |
types: [opened, synchronize] | |
branches: | |
- 'issues/gh-**' | |
- 'feat/**' | |
- main | |
paths: | |
- '**' | |
permissions: | |
contents: read | |
checks: write | |
concurrency: | |
group: ${{github.workflow}}-${{github.ref}} | |
cancel-in-progress: true | |
jobs: | |
rust: | |
name: "Rust CI / ${{matrix.runner == 'ubuntu-24.04' && 'Linux (x64)' || matrix.runner == 'linux-aarch64' && 'Linux (aarch64)' || matrix.runner == 'macos-latest' && 'macOS (x64)' || matrix.runner == 'macos-14-xlarge' && 'macOS (aarch64)' || matrix.runner == 'windows-latest' && 'Windows (x64)'}}" | |
runs-on: ${{matrix.runner}} | |
strategy: | |
fail-fast: true | |
matrix: | |
runner: | |
[ | |
ubuntu-24.04, | |
linux-aarch64, | |
macos-latest, | |
macos-14-xlarge, | |
windows-latest | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
# Ensure that we test on the recent Nightly compiler toolchain | |
- run: rm ${GITHUB_WORKSPACE}/rust-toolchain.toml | |
shell: bash | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
- name: 'Windows: Setup vcpkg' | |
if: ${{matrix.runner == 'windows-latest'}} | |
run: ./src/ci/windows/Setup-Vcpkg.ps1 | |
- name: 'Windows: Setup vcpkg cache' | |
if: ${{matrix.runner == 'windows-latest'}} | |
uses: actions/cache@v4 | |
with: | |
key: vcpkg-cache | |
path: | | |
${{env.VCPKG_ROOT}} | |
- name: 'Windows: Install libraries' | |
if: ${{matrix.runner == 'windows-latest'}} | |
run: ./src/ci/windows/Install-Libraries.ps1 | |
- name: 'Windows: Install `nasm` for `aws-lc-sys`' | |
if: ${{matrix.runner == 'windows-latest'}} | |
uses: ilammy/setup-nasm@v1 | |
- uses: taiki-e/cache-cargo-install-action@v2 | |
with: | |
tool: cargo-nextest | |
- run: cargo build --workspace --all-features | |
- run: cargo nextest run --workspace --all-features | |
- run: cargo test --doc --workspace --all-features | |
cargo-deny: | |
name: 'Rust / `cargo deny`' | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/cache-cargo-install-action@v2 | |
with: | |
tool: cargo-deny | |
- run: cargo deny check all | |
report-missing-dependencies: | |
name: 'Rust / Report Missing Dependencies' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/cache-cargo-install-action@v2 | |
with: | |
tool: cargo-machete | |
- run: cargo machete | |
# Perform Cachix builds on each commit (for bleeding edge cases) | |
# and each release (for `Noelware/nixpkgs-noelware`). | |
nix-build: | |
name: 'Nix / Build' | |
runs-on: ubuntu-latest | |
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v30 | |
# TODO(@auguwu): switch to https://nix.noelware.org, | |
# which uses Attic as the binary cache | |
# service. | |
# - uses: ryanccn/attic-action@v0 | |
# with: | |
# endpoint: https://nix.noelware.org | |
# cache: noelware | |
# token: ${{secrets.NIX_BINARY_CACHE_TOKEN}} | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: noelware | |
authToken: ${{secrets.CACHIX_AUTH_TOKEN}} | |
- name: 'Build :: `charted`' | |
run: nix build .#charted | |
- name: 'Build :: `charted-helm-plugin`' | |
run: nix build .#helm-plugin | |
clippy: | |
name: 'Rust / Clippy' | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
# Ensure that we test on the recent Nightly compiler toolchain | |
- run: rm ${GITHUB_WORKSPACE}/rust-toolchain.toml | |
shell: bash | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- uses: auguwu/[email protected] | |
with: | |
all-features: true | |
check-args: --workspace --locked | |
token: ${{github.token}} |