Skip to content

Commit 3f00318

Browse files
Merge pull request #38 from sebastienrousseau/feat/libmake
v0.2.6
2 parents e6642c6 + 6463816 commit 3f00318

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+2243
-443
lines changed

.cargo/config.toml

-2
This file was deleted.

.github/workflows/audit.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: 🧪 Audit
33
on:
44
push:
55
branches:
6+
- main
67
- feat/libmake
78
pull_request:
89
branches:
@@ -18,6 +19,10 @@ jobs:
1819
- uses: hecrj/setup-rust-action@v2
1920
- name: Install cargo-audit
2021
run: cargo install cargo-audit
22+
2123
- uses: actions/checkout@v4
22-
- name: Audit dependencies
24+
- name: Resolve dependencies
25+
run: cargo update
26+
27+
- name: Audit vulnerabilities
2328
run: cargo audit

.github/workflows/check.yml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: 🧪 Check
33
on:
44
push:
55
branches:
6+
- main
67
- feat/libmake
78
pull_request:
89
branches:

.github/workflows/coverage.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: 📶 Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
coverage:
14+
name: Code Coverage
15+
runs-on: ubuntu-latest
16+
env:
17+
CARGO_INCREMENTAL: "0"
18+
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
19+
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests"
20+
21+
steps:
22+
# Checkout the repository
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
# Setup Rust nightly
27+
- name: Install Rust
28+
uses: actions-rs/toolchain@v1
29+
id: toolchain
30+
with:
31+
toolchain: nightly
32+
override: true
33+
34+
# Configure cache for Cargo
35+
- name: Cache Cargo registry, index
36+
uses: actions/cache@v4
37+
id: cache-cargo
38+
with:
39+
path: |
40+
~/.cargo/registry
41+
~/.cargo/bin
42+
~/.cargo/git
43+
key: linux-${{ steps.toolchain.outputs.rustc_hash }}-rust-cov-${{ hashFiles('**/Cargo.lock') }}
44+
45+
# Run tests with all features
46+
- name: Test (cargo test)
47+
uses: actions-rs/cargo@v1
48+
with:
49+
command: test
50+
args: "--workspace"
51+
52+
# Install grcov
53+
- uses: actions-rs/[email protected]
54+
id: coverage
55+
56+
# Upload to Codecov.io
57+
- name: Upload to Codecov.io
58+
uses: codecov/codecov-action@v4
59+
with:
60+
token: ${{ secrets.CODECOV_TOKEN }}
61+
file: ${{ steps.coverage.outputs.report }}

.github/workflows/document.yml

+9-11
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ on:
44
push:
55
branches:
66
- main
7-
- feat/libmake
87
pull_request:
98
branches:
10-
- feat/libmake
9+
- main
1110
release:
1211
types: [created]
1312

@@ -38,24 +37,23 @@ jobs:
3837
echo '<html><head><meta http-equiv="refresh" content="0; url=/libmake/"></head><body></body></html>' > ./target/doc/index.html
3938
4039
- name: Deploy
41-
uses: actions/upload-artifact@v3
40+
uses: actions/upload-artifact@v4
4241
with:
4342
name: documentation
4443
path: target/doc
4544
if-no-files-found: error
4645
retention-days: 1
4746

4847
- name: Write CNAME file
49-
run: echo 'docs.libmake.com' > ./target/doc/CNAME
48+
run: echo 'doc.libmake.com' > ./target/doc/CNAME
5049

5150
- name: Deploy to GitHub Pages
52-
uses: peaceiris/actions-gh-pages@v3
51+
uses: peaceiris/actions-gh-pages@v4
5352
with:
54-
github_token: ${{ secrets.GITHUB_TOKEN }}
55-
publish_dir: ./target/doc
56-
publish_branch: gh-pages
5753
cname: true
58-
clean: true
5954
commit_message: Deploy documentation at ${{ github.sha }}
60-
commit_user_name: github-actions
61-
commit_user_email: [email protected]
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
publish_branch: gh-pages
57+
publish_dir: ./target/doc
58+
user_email: [email protected]
59+
user_name: github-actions

.github/workflows/lint.yml

+43-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,59 @@
1-
name: 🧪 Lint
1+
name: 🧪 Document
22

33
on:
44
push:
55
branches:
6-
- feat/libmake
6+
- main
77
pull_request:
88
branches:
9-
- feat/libmake
9+
- main
1010
release:
1111
types: [created]
1212

1313
jobs:
1414
all:
15-
name: Lint
15+
name: Document
16+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
1617
runs-on: ubuntu-latest
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
1720
steps:
1821
- uses: hecrj/setup-rust-action@v2
1922
with:
20-
components: clippy
23+
rust-version: nightly
24+
2125
- uses: actions/checkout@v4
22-
- name: Check lints
23-
run: cargo clippy --workspace --all-features --all-targets --no-deps -- -D warnings
26+
27+
- name: Update libssl
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y libssl1.1
31+
32+
- name: Generate documentation for all features and publish it
33+
run: |
34+
RUSTDOCFLAGS="--cfg docsrs" \
35+
cargo doc --no-deps --all-features --workspace
36+
# Write index.html with redirect
37+
echo '<html><head><meta http-equiv="refresh" content="0; url=/libmake/"></head><body></body></html>' > ./target/doc/index.html
38+
39+
- name: Deploy
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: documentation
43+
path: target/doc
44+
if-no-files-found: error
45+
retention-days: 1
46+
47+
- name: Write CNAME file
48+
run: echo 'doc.libmakelib.com' > ./target/doc/CNAME
49+
50+
- name: Deploy to GitHub Pages
51+
uses: peaceiris/actions-gh-pages@v4
52+
with:
53+
cname: true
54+
commit_message: Deploy documentation at ${{ github.sha }}
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
publish_branch: gh-pages
57+
publish_dir: ./target/doc
58+
user_email: [email protected]
59+
user_name: github-actions

.github/workflows/release.yml

+21-111
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
name: 🧪 Release
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- feat/libmake
8+
pull_request:
9+
branches:
10+
- feat/libmake
11+
release:
12+
types: [created]
413

514
concurrency:
615
group: ${{ github.ref }}
@@ -21,114 +30,25 @@ jobs:
2130
BUILD_ID: ${{ github.run_id }}
2231
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_API_TOKEN }}
2332
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
OS: ${{ matrix.os }}
25-
TARGET: ${{ matrix.target }}
33+
OS: ${{ matrix.platform.os }}
34+
TARGET: ${{ matrix.platform.target }}
2635

2736
strategy:
2837
fail-fast: false
2938
matrix:
30-
target:
31-
# List of targets:
32-
# https://doc.rust-lang.org/nightly/rustc/platform-support.html
33-
34-
# Tier 1 platforms 🏆
35-
- aarch64-unknown-linux-gnu # 64-bit Linux systems on ARM architecture
36-
- i686-pc-windows-gnu # 32-bit Windows (i686-pc-windows-gnu)
37-
- i686-pc-windows-msvc # 32-bit Windows (i686-pc-windows-msvc)
38-
- i686-unknown-linux-gnu # 32-bit Linux (kernel 3.2+, glibc 2.17+)
39-
- x86_64-apple-darwin # 64-bit macOS (10.7 Lion or later)
40-
- x86_64-pc-windows-gnu # 64-bit Windows (x86_64-pc-windows-gnu)
41-
- x86_64-pc-windows-msvc # 64-bit Windows (x86_64-pc-windows-msvc)
42-
- x86_64-unknown-linux-gnu # 64-bit Linux (kernel 2.6.32+, glibc 2.11+)
43-
44-
# Tier 2 platforms 🥈
45-
- aarch64-apple-darwin # 64-bit macOS on Apple Silicon
46-
- aarch64-pc-windows-msvc # 64-bit Windows (aarch64-pc-windows-msvc)
47-
- aarch64-unknown-linux-musl # 64-bit Linux systems on ARM architecture
48-
- arm-unknown-linux-gnueabi # ARMv6 Linux (kernel 3.2, glibc 2.17)
49-
- arm-unknown-linux-gnueabihf # ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
50-
- armv7-unknown-linux-gnueabihf # ARMv7 Linux, hardfloat (kernel 3.2, glibc 2.17)
51-
- powerpc-unknown-linux-gnu # PowerPC Linux (kernel 3.2, glibc 2.17)
52-
- powerpc64-unknown-linux-gnu # PowerPC64 Linux (kernel 3.2, glibc 2.17)
53-
- powerpc64le-unknown-linux-gnu # PowerPC64le Linux (kernel 3.2, glibc 2.17)
54-
# - riscv64gc-unknown-linux-gnu # RISC-V Linux (kernel 3.2, glibc 2.17)
55-
- s390x-unknown-linux-gnu # s390x Linux (kernel 3.2, glibc 2.17)
56-
- x86_64-unknown-freebsd # 64-bit FreeBSD on x86-64
57-
- x86_64-unknown-linux-musl # 64-bit Linux (kernel 2.6.32+, musl libc)
58-
# - x86_64-unknown-netbsd # 64-bit NetBSD on x86-64
59-
60-
include:
61-
# Tier 1 platforms 🏆
62-
- target: aarch64-unknown-linux-gnu
63-
os: ubuntu-latest
64-
cross: true
65-
- target: i686-pc-windows-gnu
66-
os: ubuntu-latest
67-
cross: true
68-
- target: i686-pc-windows-msvc
39+
platform:
40+
- target: x86_64-pc-windows-msvc
41+
os: windows-latest
42+
- target: aarch64-pc-windows-msvc
6943
os: windows-latest
70-
cross: true
71-
- target: i686-unknown-linux-gnu
72-
os: ubuntu-latest
73-
cross: true
7444
- target: x86_64-apple-darwin
7545
os: macos-latest
76-
cross: true
77-
- target: x86_64-pc-windows-gnu
78-
os: ubuntu-latest
79-
cross: true
80-
- target: x86_64-pc-windows-msvc
81-
os: windows-latest
82-
cross: true
83-
- target: x86_64-unknown-linux-gnu
84-
os: ubuntu-latest
85-
cross: true
86-
87-
# Tier 2 platforms 🥈
8846
- target: aarch64-apple-darwin
8947
os: macos-latest
90-
cross: true
91-
- target: aarch64-pc-windows-msvc
92-
os: windows-latest
93-
cross: true
94-
- target: aarch64-unknown-linux-musl
95-
os: ubuntu-latest
96-
cross: true
97-
- target: arm-unknown-linux-gnueabi
98-
os: ubuntu-latest
99-
cross: true
100-
- target: arm-unknown-linux-gnueabihf
101-
os: ubuntu-latest
102-
cross: true
103-
- target: armv7-unknown-linux-gnueabihf
104-
os: ubuntu-latest
105-
cross: true
106-
- target: powerpc-unknown-linux-gnu
107-
os: ubuntu-latest
108-
cross: true
109-
- target: powerpc64-unknown-linux-gnu
110-
os: ubuntu-latest
111-
cross: true
112-
- target: powerpc64le-unknown-linux-gnu
113-
os: ubuntu-latest
114-
cross: true
115-
# - target: riscv64gc-unknown-linux-gnu
116-
# os: ubuntu-latest
117-
# cross: true
118-
- target: s390x-unknown-linux-gnu
119-
os: ubuntu-latest
120-
cross: true
121-
- target: x86_64-unknown-freebsd
122-
os: ubuntu-latest
123-
cross: true
124-
- target: x86_64-unknown-linux-musl
48+
- target: x86_64-unknown-linux-gnu
12549
os: ubuntu-latest
126-
cross: true
127-
# - target: x86_64-unknown-netbsd
128-
# os: ubuntu-latest
129-
# cross: true
13050

131-
runs-on: ${{ matrix.os }}
51+
runs-on: ${{ matrix.platform.os }}
13252

13353
steps:
13454
# Check out the repository code.
@@ -147,7 +67,7 @@ jobs:
14767
# Cache dependencies to speed up subsequent builds.
14868
- name: Cache dependencies
14969
id: cache-dependencies
150-
uses: actions/cache@v3
70+
uses: actions/cache@v4
15171
with:
15272
path: ~/.cargo
15373
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
@@ -158,21 +78,11 @@ jobs:
15878
id: install-target
15979
run: rustup target add ${{ env.TARGET }}
16080

161-
- name: Install Cross and clean artifacts
162-
run: |
163-
# Install cross
164-
cargo install cross
165-
166-
# Clean the build artifacts
167-
cargo clean --verbose
168-
shell: bash
169-
17081
# Build the targets
17182
- name: Build targets
17283
id: build-targets
17384
uses: actions-rs/cargo@v1
17485
with:
175-
use-cross: true
17686
command: build
17787
args: --verbose --workspace --release --target ${{ env.TARGET }}
17888

@@ -219,7 +129,7 @@ jobs:
219129

220130
# Cache dependencies to speed up subsequent builds
221131
- name: Cache dependencies
222-
uses: actions/cache@v3
132+
uses: actions/cache@v4
223133
with:
224134
path: ~/.cargo
225135
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
@@ -310,7 +220,7 @@ jobs:
310220
# Cache dependencies to speed up subsequent builds
311221
- name: Cache dependencies
312222
id: cache-dependencies
313-
uses: actions/cache@v3
223+
uses: actions/cache@v4
314224
with:
315225
path: /home/runner/.cargo/registry/index/
316226
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}

0 commit comments

Comments
 (0)