Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 62 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "build.rs"
- "Cargo.toml"
- "Cargo.lock"
- "Makefile"
- "!.gitignore"
- "!LICENSE"
- "!README.md"
Expand All @@ -22,6 +23,7 @@ on:
- "build.rs"
- "Cargo.toml"
- "Cargo.lock"
- "Makefile"
- "!.gitignore"
- "!LICENSE"
- "!README.md"
Expand All @@ -38,8 +40,8 @@ jobs:
fail-fast: false
matrix:
os: [
ubuntu-24.04, ubuntu-22.04,
ubuntu-24.04-arm, ubuntu-22.04-arm,
ubuntu-26.04, ubuntu-24.04, ubuntu-22.04,
ubuntu-26.04-arm, ubuntu-24.04-arm, ubuntu-22.04-arm,
windows-latest,
macos-26, macos-15, macos-14
]
Expand All @@ -48,7 +50,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0

Expand All @@ -59,3 +61,60 @@ jobs:
- uses: livewing/lcov-job-summary@v1.3.0
with:
lcov: ./lcov.info


targets:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: ubuntu-26.04-arm
target: aarch64-unknown-linux-gnu
- os: ubuntu-26.04-arm
target: aarch64-unknown-linux-musl
- os: windows-latest
target: x86_64-pc-windows-msvc
# - os: windows-latest
# target: x86_64-pc-windows-gnullvm
- os: windows-latest
target: x86_64-pc-windows-gnu
- os: windows-11-arm
target: aarch64-pc-windows-msvc
# - os: windows-11-arm
# target: aarch64-pc-windows-gnullvm
- os: macos-latest
target: aarch64-apple-darwin
- os: macos-26-intel
target: x86_64-apple-darwin

name: Compilation on ${{ matrix.os }} for ${{ matrix.target }}
runs-on: ${{ matrix.os }}
permissions:
contents: read

steps:
- uses: actions/checkout@v7

- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
cache: false
override: true

- run: cargo test --profile release --target ${{ matrix.target }} --all-features

- run: ls -alh ./target/release

- uses: actions/upload-artifact@v7
with:
name: ${{ github.run_id }}-${{ matrix.os }}-${{ matrix.target }}
path: |
./target
retention-days: 1
overwrite: true
2 changes: 1 addition & 1 deletion .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand Down
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
CARGO ?= cargo
PROFILE ?= release
FEATURES ?= --all-features
CARGO ?= cargo
PROFILE ?= release
FEATURES ?= --all-features

CLIPPY_PROFILE ?= dev
TEST_PROFILE ?= dev
CLIPPY_PROFILE ?= $(PROFILE)
TEST_PROFILE ?= $(PROFILE)

CLIPPY_FLAGS = $(FEATURES) --all-targets -- -D warnings
TARPAULIN_FLAGS = --run-types AllTargets --out lcov --out stdout
CLIPPY_FLAGS = $(FEATURES) --all-targets -- -D warnings
TARPAULIN_FLAGS = --run-types AllTargets --out lcov --out stdout --skip-clean --target-dir target/tarpaulin

.PHONY: all build test lint lint-fix fmt fmt-check clean ci help
.PHONY: all build test lint lint-fix fmt fmt-check clean ci coverage

all: fmt-check lint test build

build:
$(CARGO) build --profile $(PROFILE) $(FEATURES)

test:
$(CARGO) test --profile $(TEST_PROFILE) $(FEATURES)

coverage:
$(CARGO) tarpaulin --profile $(TEST_PROFILE) $(FEATURES) $(TARPAULIN_FLAGS)

lint:
Expand All @@ -33,4 +36,4 @@ fmt-check:
clean:
$(CARGO) clean

ci: fmt-check lint test build
ci: fmt-check lint coverage build
Loading