diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7743ec1..504266a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ on: - "build.rs" - "Cargo.toml" - "Cargo.lock" + - "Makefile" - "!.gitignore" - "!LICENSE" - "!README.md" @@ -22,6 +23,7 @@ on: - "build.rs" - "Cargo.toml" - "Cargo.lock" + - "Makefile" - "!.gitignore" - "!LICENSE" - "!README.md" @@ -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 ] @@ -48,7 +50,7 @@ jobs: permissions: contents: read steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 with: fetch-depth: 0 @@ -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 \ No newline at end of file diff --git a/.github/workflows/rust-clippy.yml b/.github/workflows/rust-clippy.yml index cf2a176..b68b54f 100644 --- a/.github/workflows/rust-clippy.yml +++ b/.github/workflows/rust-clippy.yml @@ -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 diff --git a/Makefile b/Makefile index 720965d..f8a502a 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,14 @@ -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 @@ -16,6 +16,9 @@ build: $(CARGO) build --profile $(PROFILE) $(FEATURES) test: + $(CARGO) test --profile $(TEST_PROFILE) $(FEATURES) + +coverage: $(CARGO) tarpaulin --profile $(TEST_PROFILE) $(FEATURES) $(TARPAULIN_FLAGS) lint: @@ -33,4 +36,4 @@ fmt-check: clean: $(CARGO) clean -ci: fmt-check lint test build +ci: fmt-check lint coverage build