-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dom Rodriguez <[email protected]>
- Loading branch information
Showing
11 changed files
with
450 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
name: Nightly builder (Linux) | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-nightlies-linux: | ||
name: Nightly builds for Linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
target: [aarch64-unknown-linux-musl, x86_64-unknown-linux-musl] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Cache Rust assets | ||
id: rust-cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Configure Rust | ||
if: ${{ steps.rust-cache.outputs.cache-hit != 'true' }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
override: true | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
- name: Install Cross | ||
if: ${{ steps.rust-cache.outputs.cache-hit != 'true' }} | ||
uses: brndnmtthws/[email protected] | ||
with: | ||
packages: cross | ||
- name: Build bestool release for Linux. | ||
id: build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: >- | ||
--all --locked --verbose --target=${{ matrix.target }} | ||
use-cross: true | ||
- name: Create nightly release | ||
continue-on-error: true | ||
uses: actions/create-release@v1 | ||
with: | ||
draft: false | ||
prerelease: true | ||
body: "Nightly build of `bestool` for Linux: ${{ matrix.target }}" | ||
release_name: bestool-nightly-${{ matrix.target }} | ||
tag_name: bestool-nightly-${{ matrix.target }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Upload debug nightly build | ||
run: gh release upload bestool-nightly-${{ matrix.target }} ${{ github.workspace }}/target/${{ matrix.target }}/debug/bestool --clobber | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
name: Nightly builder (macOS) | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-nightlies-macos: | ||
name: Nightly builds for macOS | ||
runs-on: macos-14 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
target: [aarch64-apple-darwin, x86_64-apple-darwin] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Cache Rust assets | ||
id: rust-cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Configure Rust | ||
if: ${{ steps.rust-cache.outputs.cache-hit != 'true' }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
override: true | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
- name: Build bestool release for macOS. | ||
id: build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: >- | ||
--all --locked --verbose --target=${{ matrix.target }} | ||
- name: Create nightly release | ||
continue-on-error: true | ||
uses: actions/create-release@v1 | ||
with: | ||
draft: false | ||
prerelease: true | ||
body: "Nightly build of `bestool` for macOS: ${{ matrix.target }}" | ||
release_name: bestool-nightly-${{ matrix.target }} | ||
tag_name: bestool-nightly-${{ matrix.target }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Upload debug nightly build | ||
run: gh release upload bestool-nightly-${{ matrix.target }} ${{ github.workspace }}/target/${{ matrix.target }}/debug/bestool --clobber | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
name: Nightly builder (Windows) | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-nightlies-windows: | ||
name: Nightly builds for Windows | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
target: [x86_64-pc-windows-gnu] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Cache Rust assets | ||
id: rust-cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Configure Rust | ||
if: ${{ steps.rust-cache.outputs.cache-hit != 'true' }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
override: true | ||
target: ${{ matrix.target }} | ||
profile: minimal | ||
- name: Build bestool release for Windows. | ||
id: build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: >- | ||
--all --locked --verbose --target=${{ matrix.target }} | ||
- name: Create nightly release | ||
continue-on-error: true | ||
uses: actions/create-release@v1 | ||
with: | ||
draft: false | ||
prerelease: true | ||
body: "Nightly build of `bestool` for Windows: ${{ matrix.target }}" | ||
release_name: bestool-nightly-${{ matrix.target }} | ||
tag_name: bestool-nightly-${{ matrix.target }} | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: Upload debug nightly build | ||
run: gh release upload bestool-nightly-${{ matrix.target }} ${{ github.workspace }}/target/${{ matrix.target }}/debug/bestool.exe --clobber | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
name: Nightly Builders | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: 0 0 * * 1 | ||
|
||
jobs: | ||
check_date: | ||
runs-on: ubuntu-latest | ||
name: Check latest commit | ||
if: ${{ github.event_name == 'schedule' }} | ||
outputs: | ||
should_run: ${{ steps.should_run.outputs.should_run }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- id: should_run | ||
continue-on-error: true | ||
name: Check latest commit is less than a day | ||
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo | ||
"::set-output name=should_run::false" | ||
|
||
build-macos-debug: | ||
needs: check_date | ||
if: ${{ needs.check_date.outputs.should_run != 'false' }} | ||
uses: ./.github/workflows/ci-debug-builds-macos.yml | ||
secrets: inherit | ||
|
||
build-linux-debug: | ||
needs: check_date | ||
if: ${{ needs.check_date.outputs.should_run != 'false' }} | ||
uses: ./.github/workflows/ci-debug-builds-linux.yml | ||
secrets: inherit | ||
|
||
build-windows-debug: | ||
needs: check_date | ||
if: ${{ needs.check_date.outputs.should_run != 'false' }} | ||
uses: ./.github/workflows/ci-debug-builds-windows.yml | ||
secrets: inherit |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: CI tests (Common) | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
run-tests: | ||
name: Common CI tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Configure Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
components: clippy,rustfmt | ||
override: true | ||
default: true | ||
- name: Install `cargo-audit` | ||
run: cargo install --locked cargo-audit | ||
- name: Install `cargo-vet` | ||
run: cargo install --locked cargo-vet --version "0.9.0" | ||
- name: Run `cargo-vet` | ||
run: cargo vet --locked | ||
working-directory: src/oldbestool | ||
- name: Run `cargo-audit` | ||
run: cargo audit -D unsound -D yanked -D unmaintained --ignore "RUSTSEC-2020-0168" | ||
working-directory: src/oldbestool |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
name: CI tests (Linux) | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
run-linux-tests: | ||
name: CI tests for ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
target: [aarch64-unknown-linux-musl, x86_64-unknown-linux-musl] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Cache Rust assets | ||
id: rust-cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Configure Rust | ||
if: ${{ steps.rust-cache.outputs.cache-hit != 'true' }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
components: clippy,rustfmt | ||
override: true | ||
target: ${{ matrix.target }} | ||
default: true | ||
- name: Install Cross | ||
if: ${{ steps.rust-cache.outputs.cache-hit != 'true' }} | ||
uses: brndnmtthws/[email protected] | ||
with: | ||
packages: cross | ||
|
||
- name: Run Linux tests of `bestool` | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --target=${{ matrix.target }} | ||
use-cross: true | ||
|
||
- name: Run Linux checks of `bestool` | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --target=${{ matrix.target }} | ||
use-cross: true | ||
|
||
- name: Run Linux Clippy tests of `bestool` | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --target=${{ matrix.target }} | ||
use-cross: true |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
name: CI tests (macOS) | ||
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
run-macos-tests: | ||
name: CI tests for ${{ matrix.target }} | ||
runs-on: macos-14 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
target: [aarch64-apple-darwin, x86_64-apple-darwin] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- name: Cache Rust assets | ||
id: rust-cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Configure Rust | ||
if: ${{ steps.rust-cache.outputs.cache-hit != 'true' }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
components: clippy,rustfmt | ||
override: true | ||
target: ${{ matrix.target }} | ||
default: true | ||
- name: Run macOS tests of `bestool` | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --target=${{ matrix.target }} | ||
- name: Run macOS checks of `bestool` | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: --target=${{ matrix.target }} | ||
- name: Run macOS Clippy tests of `bestool` | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
args: --target=${{ matrix.target }} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
name: CI tests (Nix) | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
run-tests: | ||
name: Nix CI tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
- uses: cachix/install-nix-action@v25 | ||
- name: Build Nix package | ||
run: nix build | ||
- name: Check Flake formatting | ||
run: nix run nixpkgs#nixpkgs-fmt -- --check ./ | ||
- name: Check Flake with Nix | ||
run: nix flake check | ||
- name: Check Flake with Statix | ||
run: nix run nixpkgs#statix -- check ./ |
Oops, something went wrong.