merge: basic-ci
from #18 to main
This commit is contained in:
commit
7e99a9755b
9 changed files with 12 additions and 238 deletions
|
@ -12,11 +12,12 @@ on:
|
|||
- '**/Cargo.toml'
|
||||
- '**/Cargo.lock'
|
||||
- 'deny.toml'
|
||||
pull_request:
|
||||
branches: [main]
|
||||
jobs:
|
||||
security_audit:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: native
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: taiki-e/install-action@cargo-deny
|
||||
- name: Scan for vulnerabilities
|
||||
run: cargo deny check
|
||||
run: nix develop --accept-flake-config --command cargo deny check
|
|
@ -14,7 +14,7 @@ concurrency:
|
|||
jobs:
|
||||
build:
|
||||
name: Conventional Commits
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: native
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: webiny/action-conventional-commits@v1.3.0
|
||||
- uses: https://github.com/webiny/action-conventional-commits@v1.3.0
|
5
.github/FUNDING.yml
vendored
Normal file
5
.github/FUNDING.yml
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2024 Christina Sørensen
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
github: cafkafk
|
21
.github/dependabot.yml
vendored
21
.github/dependabot.yml
vendored
|
@ -1,21 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 Christina Sørensen
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "cargo" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
- package-ecosystem: "github-actions"
|
||||
# Workflow files stored in the
|
||||
# default location of `.github/workflows`
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
63
.github/workflows/flake.yml
vendored
63
.github/workflows/flake.yml
vendored
|
@ -1,63 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 Christina Sørensen
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.github/workflows/flake.yml'
|
||||
- 'src/**'
|
||||
- 'Cargo.*'
|
||||
- "*.toml"
|
||||
- "flake.*"
|
||||
- "*.nix"
|
||||
- "*.rs"
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.github/workflows/flake.yml'
|
||||
- 'src/**'
|
||||
- 'Cargo.*'
|
||||
- "*.toml"
|
||||
- "flake.*"
|
||||
- "*.nix"
|
||||
- "*.rs"
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
flake-checker:
|
||||
name: Flake Checker
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Check Nix flake inputs
|
||||
uses: DeterminateSystems/flake-checker-action@v8
|
||||
check:
|
||||
name: Check Nix Flake
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v13
|
||||
- name: Setup Nix cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Nix Flake Check
|
||||
run: nix flake check --all-systems
|
||||
build:
|
||||
name: Build Nix package
|
||||
# if cross compilation is desired add 'aarch64-linux', 'x86_64-darwin' and 'aarch64-darwin' and fix the flake to support cross compilation.
|
||||
strategy:
|
||||
matrix:
|
||||
target: [x86_64-linux]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v13
|
||||
- name: Setup Nix cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Nix Build
|
||||
run: nix build .#packages.${{ matrix.target }}.default
|
97
.github/workflows/unit-tests-bsd.yml
vendored
97
.github/workflows/unit-tests-bsd.yml
vendored
|
@ -1,97 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 Christina Sørensen
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
name: Unit tests (BSD)
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.github/workflows/unit-tests-bsd.yml'
|
||||
- 'src/**'
|
||||
- 'Cargo.*'
|
||||
- build.rs
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.github/workflows/unit-tests-bsd.yml'
|
||||
- 'src/**'
|
||||
- 'Cargo.*'
|
||||
- build.rs
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
unit-tests-freebsd:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Compile
|
||||
uses: vmactions/freebsd-vm@v1
|
||||
with:
|
||||
release: '14.1'
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg install -y rust git
|
||||
cargo install cargo-hack
|
||||
git config --global --add safe.directory /home/runner/work/eza/eza
|
||||
run: |
|
||||
set -e
|
||||
export CARGO_TERM_COLOR="always"
|
||||
export RUSTFLAGS="--deny warnings"
|
||||
cargo fmt --check
|
||||
cargo clippy -- -D warnings
|
||||
cargo hack test
|
||||
unit-tests-netbsd:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Compile
|
||||
uses: vmactions/netbsd-vm@v1
|
||||
with:
|
||||
release: '10.0'
|
||||
usesh: true
|
||||
prepare: |
|
||||
PATH="/root/.cargo/bin:/usr/pkg/sbin:/usr/pkg/bin:$PATH"
|
||||
PKG_PATH="https://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/10.0/All/"
|
||||
export PATH PKG_PATH
|
||||
/usr/sbin/pkg_add pkgin
|
||||
pkgin -y install rust git
|
||||
cargo install cargo-hack
|
||||
git config --global --add safe.directory /home/runner/work/eza/eza
|
||||
run: |
|
||||
set -e
|
||||
export CARGO_TERM_COLOR="always"
|
||||
export RUSTFLAGS="--deny warnings"
|
||||
cargo fmt --check
|
||||
cargo clippy -- -D warnings
|
||||
cargo hack test
|
||||
unit-tests-openbsd:
|
||||
runs-on: ubuntu-22.04
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Compile
|
||||
uses: vmactions/openbsd-vm@v1
|
||||
with:
|
||||
release: '7.4'
|
||||
usesh: true
|
||||
prepare: |
|
||||
pkg_add rust rust-rustfmt rust-clippy git
|
||||
cargo install cargo-hack
|
||||
git config --global --add safe.directory /home/runner/work/eza/eza
|
||||
run: |
|
||||
set -e
|
||||
export CARGO_TERM_COLOR="always"
|
||||
export RUSTFLAGS="--deny warnings"
|
||||
cargo fmt --check
|
||||
cargo clippy -- -D warnings
|
||||
cargo hack test
|
51
.github/workflows/unit-tests.yml
vendored
51
.github/workflows/unit-tests.yml
vendored
|
@ -1,51 +0,0 @@
|
|||
# SPDX-FileCopyrightText: 2024 Christina Sørensen
|
||||
#
|
||||
# SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
name: Unit tests
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.github/workflows/unit-tests.yml'
|
||||
- 'src/**'
|
||||
- 'Cargo.*'
|
||||
- build.rs
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.github/workflows/unit-tests.yml'
|
||||
- 'src/**'
|
||||
- 'Cargo.*'
|
||||
- build.rs
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
||||
cancel-in-progress: true
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUSTFLAGS: --deny warnings
|
||||
jobs:
|
||||
unit-tests:
|
||||
runs-on: ${{ matrix.os }}
|
||||
continue-on-error: ${{ matrix.rust == 'nightly' }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
rust: [1.70.0, stable, beta, nightly]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- run: rustup toolchain install ${{ matrix.rust }} --profile minimal
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Install cargo-hack
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
timeout_minutes: 5
|
||||
max_attempts: 5
|
||||
command: cargo install cargo-hack
|
||||
- name: Run rustfmt checks
|
||||
run: cargo fmt --check
|
||||
- name: Run clippy lints
|
||||
run: cargo clippy -- -D warnings
|
||||
- name: Run unit tests
|
||||
run: cargo hack test
|
|
@ -7,4 +7,4 @@ multiple-versions = 'allow'
|
|||
|
||||
[licenses]
|
||||
private = { ignore = true }
|
||||
allow = ["MIT"]
|
||||
allow = ["MIT", "ISC", "MPL-2.0", "Apache-2.0", "Unicode-DFS-2016", "BSD-3-Clause"]
|
||||
|
|
Loading…
Reference in a new issue