-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from sebastienrousseau/feat/libmake
v0.2.6
- Loading branch information
Showing
90 changed files
with
2,243 additions
and
443 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ name: 🧪 Check | |
on: | ||
push: | ||
branches: | ||
- main | ||
- feat/libmake | ||
pull_request: | ||
branches: | ||
|
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,61 @@ | ||
name: 📶 Coverage | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
coverage: | ||
name: Code Coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_INCREMENTAL: "0" | ||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" | ||
RUSTDOCFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
# Setup Rust nightly | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
id: toolchain | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
# Configure cache for Cargo | ||
- name: Cache Cargo registry, index | ||
uses: actions/cache@v4 | ||
id: cache-cargo | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/bin | ||
~/.cargo/git | ||
key: linux-${{ steps.toolchain.outputs.rustc_hash }}-rust-cov-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
# Run tests with all features | ||
- name: Test (cargo test) | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: "--workspace" | ||
|
||
# Install grcov | ||
- uses: actions-rs/[email protected] | ||
id: coverage | ||
|
||
# Upload to Codecov.io | ||
- name: Upload to Codecov.io | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ${{ steps.coverage.outputs.report }} |
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 |
---|---|---|
|
@@ -4,10 +4,9 @@ on: | |
push: | ||
branches: | ||
- main | ||
- feat/libmake | ||
pull_request: | ||
branches: | ||
- feat/libmake | ||
- main | ||
release: | ||
types: [created] | ||
|
||
|
@@ -38,24 +37,23 @@ jobs: | |
echo '<html><head><meta http-equiv="refresh" content="0; url=/libmake/"></head><body></body></html>' > ./target/doc/index.html | ||
- name: Deploy | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentation | ||
path: target/doc | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
- name: Write CNAME file | ||
run: echo 'docs.libmake.com' > ./target/doc/CNAME | ||
run: echo 'doc.libmake.com' > ./target/doc/CNAME | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./target/doc | ||
publish_branch: gh-pages | ||
cname: true | ||
clean: true | ||
commit_message: Deploy documentation at ${{ github.sha }} | ||
commit_user_name: github-actions | ||
commit_user_email: [email protected] | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: ./target/doc | ||
user_email: [email protected] | ||
user_name: github-actions |
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 |
---|---|---|
@@ -1,23 +1,59 @@ | ||
name: 🧪 Lint | ||
name: 🧪 Document | ||
|
||
on: | ||
push: | ||
branches: | ||
- feat/libmake | ||
- main | ||
pull_request: | ||
branches: | ||
- feat/libmake | ||
- main | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
all: | ||
name: Lint | ||
name: Document | ||
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
steps: | ||
- uses: hecrj/setup-rust-action@v2 | ||
with: | ||
components: clippy | ||
rust-version: nightly | ||
|
||
- uses: actions/checkout@v4 | ||
- name: Check lints | ||
run: cargo clippy --workspace --all-features --all-targets --no-deps -- -D warnings | ||
|
||
- name: Update libssl | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libssl1.1 | ||
- name: Generate documentation for all features and publish it | ||
run: | | ||
RUSTDOCFLAGS="--cfg docsrs" \ | ||
cargo doc --no-deps --all-features --workspace | ||
# Write index.html with redirect | ||
echo '<html><head><meta http-equiv="refresh" content="0; url=/libmake/"></head><body></body></html>' > ./target/doc/index.html | ||
- name: Deploy | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentation | ||
path: target/doc | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
- name: Write CNAME file | ||
run: echo 'doc.libmakelib.com' > ./target/doc/CNAME | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
cname: true | ||
commit_message: Deploy documentation at ${{ github.sha }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: ./target/doc | ||
user_email: [email protected] | ||
user_name: github-actions |
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
Oops, something went wrong.