Skip to content

Commit 2dbc02b

Browse files
committed
Fix ci
1 parent 63904b0 commit 2dbc02b

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ jobs:
8383
matrix:
8484
include:
8585
- runner: ubuntu-24.04
86-
target: x86_64-unknown-linux-gnu
86+
target: x86_64-unknown-linux-musl
8787
- runner: ubuntu-24.04-arm
88-
target: aarch64-unknown-linux-gnu
89-
- runner: macos-13
88+
target: aarch64-unknown-linux-musl
89+
- runner: macos-26-intel
9090
target: x86_64-apple-darwin
91-
- runner: macos-14
91+
- runner: macos-26
9292
target: aarch64-apple-darwin
9393
- runner: windows-2025
9494
target: x86_64-pc-windows-msvc
@@ -104,15 +104,25 @@ jobs:
104104

105105
- name: Set up Rust toolchain
106106
uses: dtolnay/rust-toolchain@nightly
107+
with:
108+
targets: ${{ matrix.target }}
107109

108110
- name: Cache Rust artifacts
109111
uses: Swatinem/rust-cache@v2
110112
with:
111113
shared-key: release-${{ matrix.target }}-nightly
112114
cache-on-failure: true
113115

116+
- name: Install musl toolchain
117+
if: runner.os == 'Linux'
118+
shell: bash
119+
run: |
120+
set -euo pipefail
121+
sudo apt-get update
122+
sudo apt-get install -y --no-install-recommends musl-tools
123+
114124
- name: Build release binary
115-
run: cargo build --locked --release
125+
run: cargo build --locked --release --target ${{ matrix.target }}
116126

117127
- name: Package Unix binary
118128
if: runner.os != 'Windows'
@@ -121,7 +131,7 @@ jobs:
121131
set -euo pipefail
122132
mkdir -p dist
123133
mkdir -p package
124-
cp target/release/forsmost package/forsmost
134+
cp target/${{ matrix.target }}/release/forsmost package/forsmost
125135
chmod +x package/forsmost
126136
strip package/forsmost
127137
@@ -139,7 +149,7 @@ jobs:
139149
run: |
140150
New-Item -ItemType Directory -Force dist | Out-Null
141151
New-Item -ItemType Directory -Force package | Out-Null
142-
Copy-Item target\release\forsmost.exe package\forsmost.exe
152+
Copy-Item target\${{ matrix.target }}\release\forsmost.exe package\forsmost.exe
143153
144154
$archive = "forsmost-v$env:VERSION-${{ matrix.target }}.zip"
145155
Push-Location package

0 commit comments

Comments
 (0)