Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.
Merged
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
56 changes: 25 additions & 31 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,35 @@ env:

jobs:
lint-test-release:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v4
uses: actions/checkout@v6.0.2

- name: Install Rust Toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }})
uses: actions-rs/toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
default: true
profile: minimal
components: clippy

- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets
- name: Run Clippy
run: cargo clippy --all-features --all-targets

- name: Run Tests
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test

- name: Upload to codecov.io
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v5.5.2

- name: Check for Release
id: is-release
shell: bash
run: |
unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
echo ::set-output name=IS_RELEASE::${IS_RELEASE}
if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then
echo "IS_RELEASE=true" >> "$GITHUB_OUTPUT"
else
echo "IS_RELEASE=false" >> "$GITHUB_OUTPUT"
fi

- name: Cargo Publish "comtrya-lib"
if: steps.is-release.outputs.IS_RELEASE
Expand All @@ -68,39 +65,39 @@ jobs:
matrix:
platform:
- os_name: Linux-x86_64-gnu
os: ubuntu-24.04
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
bin: comtrya
name: comtrya-x86_64-unknown-linux-gnu
cross: false
cargo_command: cargo
skip_tests: false
- os_name: Linux-aarch64-gnu
os: ubuntu-24.04
os: ubuntu-latest
target: aarch64-unknown-linux-gnu
bin: comtrya
name: comtrya-aarch64-unknown-linux-gnu
cross: false
cargo_command: ./cross
skip_tests: false
- os_name: Windows-x86_64
os: windows-2022
os: windows-latest
target: x86_64-pc-windows-msvc
bin: comtrya.exe
name: comtrya-x86_64-pc-windows-msvc
cross: false
cargo_command: cargo
skip_tests: false
- os_name: macOS-x86_64
os: macos-13
os: macos-15-intel
target: x86_64-apple-darwin
bin: comtrya
name: comtrya-x86_64-apple-darwin
cross: false
cargo_command: cargo
skip_tests: false
- os_name: macOS-aarch64
os: macos-15
os: macos-latest
target: aarch64-apple-darwin
bin: comtrya
name: comtrya-aarch64-apple-darwin
Expand All @@ -109,10 +106,10 @@ jobs:
skip_tests: false
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6.0.2

- name: Build binary
uses: houseabsolute/actions-rust-cross@v1
uses: houseabsolute/actions-rust-cross@v1.0.5
with:
command: "build"
target: ${{ matrix.platform.target }}
Expand All @@ -133,7 +130,7 @@ jobs:

- name: Upload Artifact
if: matrix.platform.target != 'x86_64-pc-windows-msvc'
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v2.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
Expand All @@ -146,7 +143,7 @@ jobs:

- name: Upload Artifact.exe
if: matrix.platform.target == 'x86_64-pc-windows-msvc'
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v2.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
Expand All @@ -162,31 +159,28 @@ jobs:
container: clux/muslrust:stable
steps:
- name: Clone Repository
uses: actions/checkout@v4
uses: actions/checkout@v6.0.2

- name: Link to muscl Toolchain
run: |
ln -s /root/.cargo $HOME/.cargo
ln -s /root/.rustup $HOME/.rustup

- name: Handle Rust Dependencies Caching
uses: Swatinem/rust-cache@v2
uses: Swatinem/rust-cache@v2.8.2
with:
key: v1-linux-musl

- name: Build Release Binary
uses: actions-rs/cargo@v1
with:
command: build
args: --release
run: cargo build --release

- name: Rename Binary
shell: bash
run: |
mv target/x86_64-unknown-linux-musl/release/comtrya target/x86_64-unknown-linux-musl/release/comtrya-x86_64-unknown-linux-musl

- name: Upload release archive
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v2.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mdbook-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ jobs:
env:
MDBOOK_VERSION: 0.4.36
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6.0.2
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --version ${MDBOOK_VERSION} mdbook
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v5.0.0
- name: Build with mdBook
run: mdbook build ./docs/
8 changes: 4 additions & 4 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ jobs:
env:
MDBOOK_VERSION: 0.4.36
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6.0.2
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --version ${MDBOOK_VERSION} mdbook
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
uses: actions/configure-pages@v5.0.0
- name: Build with mdBook
run: mdbook build ./docs/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4.0.0
with:
path: ./docs/book

Expand All @@ -59,4 +59,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4.0.5
37 changes: 13 additions & 24 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,27 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6.0.2

- uses: agenthunt/conventional-commit-checker-action@v2.0.0
- uses: agenthunt/conventional-commit-checker-action@v2.0.1
continue-on-error: true
with:
pr-body-regex: ".*"

- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
profile: minimal
components: clippy,rustfmt
override: true

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

- uses: giraffate/clippy-action@v1
- uses: giraffate/clippy-action@v1.0.1
with:
reporter: "github-pr-review"
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --all-features --all-targets

- uses: codecov/codecov-action@v5
- uses: codecov/codecov-action@v5.5.2

test:
name: ${{ matrix.job.os }} (${{ matrix.job.target }})
Expand All @@ -58,17 +53,17 @@ jobs:
# target: aarch64-unknown-linux-gnu,
# use-cross: true,
# }
- { os: ubuntu-24.04, target: x86_64-unknown-linux-gnu }
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
# - {
# os: ubuntu-20.04,
# target: x86_64-unknown-linux-musl,
# use-cross: true,
# }
- { os: macos-13, target: x86_64-apple-darwin }
- { os: macos-14, target: aarch64-apple-darwin }
- { os: windows-2022, target: x86_64-pc-windows-msvc }
- { os: macos-15-intel, target: x86_64-apple-darwin }
- { os: macos-latest, target: aarch64-apple-darwin }
- { os: windows-latest, target: x86_64-pc-windows-msvc }
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6.0.2

- shell: bash
run: |
Expand All @@ -83,15 +78,9 @@ jobs:
echo "PROJECT_MAINTAINER=$(sed -n 's/^authors = \["\(.*\)"\]/\1/p' Cargo.toml)" >> $GITHUB_ENV
echo "PROJECT_HOMEPAGE=$(sed -n 's/^homepage = "\(.*\)"/\1/p' Cargo.toml)" >> $GITHUB_ENV

- uses: actions-rs/toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal

- uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: test
args: --target=${{ matrix.job.target }} ${{ steps.test-options.outputs.CARGO_TEST_OPTIONS}}
- run: cargo test --target=${{ matrix.job.target }}
Loading