Skip to content

Commit 8b180e5

Browse files
committed
fixed build & added windows arm support
1 parent a79ddc2 commit 8b180e5

File tree

3 files changed

+28
-12
lines changed

3 files changed

+28
-12
lines changed

.cargo/config.toml

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1-
[target.'cfg(all(windows, target_env = "msvc"))']
1+
[target.'cfg(target_env = "msvc")']
22
rustflags = ["-C", "target-feature=+crt-static"]
3+
4+
[target.'cfg(target_env = "musl")']
5+
rustflags = [
6+
"-C",
7+
"target-feature=+crt-static",
8+
"-L",
9+
"-Wl,--copy-dt-needed-entries",
10+
]

.github/workflows/release.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,16 @@ jobs:
1717
os: ubuntu-latest
1818
- target: x86_64-pc-windows-msvc
1919
os: windows-latest
20+
- target: aarch64-pc-windows-msvc
21+
os: windows-latest
2022
runs-on: ${{ matrix.build.os }}
2123
steps:
2224
- uses: actions/checkout@v4
25+
- name: Install target
26+
run: rustup target add ${{ matrix.build.target }}
2327
- name: Setup musl
24-
run: |
25-
rustup target add x86_64-unknown-linux-musl
26-
sudo apt-get install -y musl-tools
27-
echo 'LDFLAGS=-Wl,--copy-dt-needed-entries' >> $GITHUB_ENV
28-
echo 'RUSTFLAGS=-C target-feature=+crt-static' >> $GITHUB_ENV
29-
if: matrix.build.target == 'x86_64-unknown-linux-musl'
30-
- name: Setup Apple Silicon
31-
run: rustup target add aarch64-apple-darwin
32-
if: matrix.build.target == 'aarch64-apple-darwin'
28+
run: sudo apt-get install -y musl-tools
29+
if: endsWith(matrix.build.target, '-musl')
3330
- uses: Swatinem/rust-cache@v2
3431
- name: Build
3532
env:
@@ -45,12 +42,17 @@ jobs:
4542
--message-format=json \
4643
| jq -r '.message.rendered // .executable // empty'
4744
)"
48-
echo "ARTIFACT_PATH=$output" >> $GITHUB_ENV
45+
{
46+
echo 'ARTIFACT_PATHS<<EOF'
47+
echo "$output"
48+
echo 'EOF'
49+
} >> "$GITHUB_ENV"
4950
- name: Upload binary
5051
uses: actions/upload-artifact@v4
5152
with:
5253
name: ${{ matrix.build.target }}
53-
path: ${{ env.ARTIFACT_PATH }}
54+
path: ${{ env.ARTIFACT_PATHS }}
55+
if-no-files-found: error
5456
release:
5557
name: Release
5658
needs: build

files/plugin.yml

+6
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ when:
4343
- family == "windows"
4444
- arch == "x86_64"
4545
executable: assets/x86_64-pc-windows-msvc/files.exe
46+
47+
---
48+
when:
49+
- family == "windows"
50+
- arch == "aarch64"
51+
executable: assets/aarch64-pc-windows-msvc/files.exe

0 commit comments

Comments
 (0)