From 42417cffc0ca0d9f3deb669ded17ce6327877772 Mon Sep 17 00:00:00 2001 From: gilcu3 Date: Sat, 20 Sep 2025 13:55:00 +0200 Subject: [PATCH 1/4] ci: allow testing without publishing --- .github/workflows/cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3ad3966..b2451f2 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -56,6 +56,7 @@ jobs: - name: Release uses: softprops/action-gh-release@v2 + if: github.ref_type == 'tag' with: files: target/${{ matrix.target }}/release/hullcaster-* env: From 084b86aa8f0787db5c57ffa1986d55ee5197c35c Mon Sep 17 00:00:00 2001 From: gilcu3 Date: Sat, 20 Sep 2025 15:59:19 +0200 Subject: [PATCH 2/4] fix: cross build, use rustup in ci --- .github/workflows/cd.yml | 21 +++------------------ .github/workflows/ci.yml | 15 +-------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b2451f2..1081213 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -23,29 +23,14 @@ jobs: - os: ubuntu-latest target: x86_64-unknown-linux-gnu dependencies: "libssl-dev libasound2-dev libdbus-1-dev" - - os: ubuntu-latest - target: aarch64-unknown-linux-gnu - cross_arch: true steps: - name: Checkout source uses: actions/checkout@v5 - - name: Install Linux dependencies - if: matrix.dependencies - run: sudo apt-get update && sudo apt-get install -y ${{ matrix.dependencies }} - - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - targets: ${{ matrix.target }} - - - name: Build - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.cross_arch }} - command: build - args: --locked --release --target ${{ matrix.target }} + - name: Install dependencies + if: ${{ runner.os == 'Linux' }} + run: sudo apt-get update && sudo apt-get install ${{ matrix.dependencies }} - name: Package shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d7a73d..0c1e147 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,35 +19,22 @@ jobs: strategy: matrix: include: - - os: macos-latest - target: x86_64-apple-darwin - os: macos-latest target: aarch64-apple-darwin - os: ubuntu-latest target: x86_64-unknown-linux-gnu dependencies: "libssl-dev libasound2-dev libdbus-1-dev" - - os: ubuntu-latest - target: aarch64-unknown-linux-gnu - cross_arch: true - toolchain: [1.88.0] runs-on: ${{ matrix.os }} steps: - name: Install dependencies - run: sudo apt-get update && sudo apt-get install libssl-dev libasound2-dev libdbus-1-dev if: ${{ runner.os == 'Linux' }} + run: sudo apt-get update && sudo apt-get install ${{ matrix.dependencies }} - name: Checkout source uses: actions/checkout@v5 - - name: Install Rust toolchain - id: install_toolchain - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ matrix.toolchain }} - components: clippy, rustfmt - - name: Cache cargo deps uses: actions/cache@v4 with: From 3ecaff564a573da39672846d44a9d4058151bec3 Mon Sep 17 00:00:00 2001 From: gilcu3 Date: Sat, 20 Sep 2025 16:04:39 +0200 Subject: [PATCH 3/4] fix: CD not building package --- .github/workflows/cd.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 1081213..b59f9c3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -32,6 +32,11 @@ jobs: if: ${{ runner.os == 'Linux' }} run: sudo apt-get update && sudo apt-get install ${{ matrix.dependencies }} + - name: Build + shell: bash + run: | + cargo build --locked --release --target ${{ matrix.target }} + - name: Package shell: bash run: | From 6c3c8c0afa5313afdf82ce26ed29c5658ca659f3 Mon Sep 17 00:00:00 2001 From: gilcu3 Date: Sat, 20 Sep 2025 16:11:55 +0200 Subject: [PATCH 4/4] feat: upload artifact after build --- .github/workflows/cd.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b59f9c3..7dd381f 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -44,6 +44,11 @@ jobs: tar czvf hullcaster-${{ matrix.target }}.tar.gz hullcaster shasum -a 256 hullcaster-${{ matrix.target }}.tar.gz > hullcaster-${{ matrix.target }}.sha256 + - uses: actions/upload-artifact@v4 + with: + name: hullcaster-${{ matrix.target }}.tar.gz + path: target/${{ matrix.target }}/release/hullcaster-${{ matrix.target }}.tar.gz + - name: Release uses: softprops/action-gh-release@v2 if: github.ref_type == 'tag'