gemini-commit-message

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 3673b6f1a8e2c54763edf93233fe5ff5f2cf838f
parent 327eeb6df876ef678b659c2199bded91ed713f62
Author: Minerva_juppiter <94231606+minerva-jupiter@users.noreply.github.com>
Date:   Sat, 25 Jul 2026 11:06:18 +0900

ci(workflows): add GitHub Actions workflows for testing and release (#9)
Diffstat:
A.github/workflows/release.yml | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.github/workflows/testing.yml | 44++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 130 insertions(+), 0 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml @@ -0,0 +1,86 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - v* + +env: + CARGO_TERM_COLOR: always + +jobs: + Test: + uses: ./.github/workflows/testing.yml + + build: + needs: [Test] + runs-on: ${{ matrix.runner }} + env: + PROJECT_NAME: image-light-freq-conv + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-unknown-linux-gnu + extension: "" + runner: ubuntu-latest + cross: true + - target: x86_64-pc-windows-msvc + extension: ".exe" + runner: windows-latest + cross: false + - target: aarch64-unknown-linux-gnu + extension: "" + runner: ubuntu-latest + cross: true + - target: aarch64-pc-windows-msvc + extension: ".exe" + runner: windows-latest + cross: false + - target: armv7-unknown-linux-gnueabihf + extension: "" + runner: ubuntu-latest + cross: true + + steps: + - name: Checkout + uses: actions/checkout@main + + - name: Install Dependencies on Windows + if: ${{ matrix.runner == 'windows-latest' }} + run: | + choco install make --yes + - name: Install Dependencies on MacOS + if: ${{ matrix.runner == 'macos-latest' }} + run: | + brew install make + + - name: Install cross (if needed) + if: ${{ matrix.cross }} + run: cargo install cross --git https://github.com/cross-rs/cross + + - name: Build Project on cross + if: ${{ matrix.cross }} + run: | + cross build --release --target ${{ matrix.target }} --verbose + - name: Build Project + if: ${{ !matrix.cross }} + run: | + rustup target add ${{ matrix.target }} + cargo build --release --target ${{ matrix.target }} --verbose + + - name: Rename Artifacts + shell: bash + run: | + mv target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}{,-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}} + + - name: Release Artifacts + uses: softprops/action-gh-release@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: | + target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }} diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml @@ -0,0 +1,44 @@ +name: Rust Testing + +on: + pull_request: + push: + branches: [main] + workflow_dispatch: + workflow_call: + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: Test + runs-on: ${{ matrix.os }} + needs: ["check"] + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + steps: + - uses: actions/checkout@main + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@master + - name: Test Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + + check: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@main + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@master + - name: Install Rust fmt + run: rustup component add rustfmt + - name: Install Rust clippy + run: rustup component add clippy + - name: Run rustfmt + run: cargo fmt --all -- --check + - name: Run clippy + run: cargo clippy --all-targets --all-features -- -D warnings