Skip to content

Commit

Permalink
feat: new configuration spec, error handling & logging (#31)
Browse files Browse the repository at this point in the history
* feat: enforce version matches

* chore: bump version

* fix: lint

* feat: first yaml config draft

* feat: run using yaml config

* chore: some cleanups

* feat: implement overrides

* fix: deserialize null values as default

* refactor: clean up

* feat: implement toml file discovery

* feat: toml -> yaml config conversion

* fix: default profile for toml config

* feat: store cache as yaml and with version

* feat: deprecation warning

* feat: bump version

* docs: update to new config spec

* feat: implement tracing

* feat: add some logs

* feat: cache logs

* feat: more logs

* fix: warnings & perf

* feat: add inspect command

* fix: warnings

* chore: format

* docs: inspect cli docs

* feat: colorize output

* docs: new CLI spec

* test: fs

* test: config utils

* test: more fs stuff

* ci: run tests on ci

* ci

* ci: parallelize

* fix: clippy warnings

* fix: move targets to cargo config

* test: cache

* test: config

* test: time

* ci

* ci: update

* ci: caching

* fix: don't return result from main

* err

* fix: the error

* ci: more caching

* ci: fix

* ci: remove unmaintained actions
  • Loading branch information
nyarthan authored Mar 24, 2024
1 parent a9e139f commit ddec96a
Show file tree
Hide file tree
Showing 19 changed files with 1,533 additions and 464 deletions.
7 changes: 7 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
rustflags = ["-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"]
65 changes: 44 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,63 @@
on:
pull_request:
branches:
- master
branches: [master]
types: [synchronize, opened]

name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"

jobs:
check:
name: Check, Format, Lint
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mozilla-actions/[email protected]
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

format:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all --check

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Lint
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Test
run: cargo test
44 changes: 18 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,25 @@ env:

jobs:
check:
name: Check, Format, Lint
name: Check, Format, Lint, Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: mozilla-actions/[email protected]
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

- name: Check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all --check

- name: Lint
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy

- name: Test
run: cargo test

build:
name: Build on ${{ matrix.os }} for ${{ matrix.arch }}
Expand All @@ -56,8 +48,9 @@ jobs:
arch: aarch64

steps:
- uses: actions/checkout@v3
- uses: mozilla-actions/[email protected]
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- uses: Swatinem/rust-cache@v2

- name: Compute Linux Target
id: linux-target
Expand All @@ -84,10 +77,7 @@ jobs:
run: sudo apt-get update && sudo apt install musl-tools

- name: Build Target ${{ steps.target.outputs.target }}
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ steps.target.outputs.target }}
run: cargo build --release --target ${{ steps.target.outputs.target }}

- name: Upload Build Artifact
uses: actions/upload-artifact@v3
Expand All @@ -102,7 +92,9 @@ jobs:
- build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
- uses: Swatinem/rust-cache@v2

- name: Download build artifacts for x86_64-unknown-linux-gnu
uses: actions/download-artifact@v3
Expand Down
Loading

0 comments on commit ddec96a

Please sign in to comment.