Skip to content

Commit ae6de1b

Browse files
committed
Zip and publish the windows artifact
1 parent 18587bd commit ae6de1b

4 files changed

Lines changed: 67 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,41 @@ jobs:
6666
path: target/release/radius2
6767

6868
build-windows:
69-
name: Check (Windows)
69+
name: Build (Windows)
7070
runs-on: windows-latest
7171

7272
steps:
7373
- uses: actions/checkout@v6
74-
- name: Check
75-
# boolector-sys needs an external boolector.lib on x86_64-pc-windows-msvc.
76-
# Keep Windows compile coverage without requiring an unsupported final link.
77-
run: cargo check --workspace --all-targets --verbose --release
74+
- name: Setup MSYS2
75+
uses: msys2/setup-msys2@v2
76+
with:
77+
msystem: MINGW64
78+
path-type: inherit
79+
update: true
80+
install: >-
81+
base-devel
82+
curl
83+
git
84+
mingw-w64-x86_64-gcc
85+
mingw-w64-x86_64-cmake
86+
patch
87+
88+
- name: Add Rust GNU target
89+
run: rustup target add x86_64-pc-windows-gnu
90+
91+
- name: Build
92+
shell: msys2 {0}
93+
run: cargo build --package radius2 --target x86_64-pc-windows-gnu --verbose --release
94+
95+
- name: Package
96+
shell: powershell
97+
run: Compress-Archive -Path target\x86_64-pc-windows-gnu\release\radius2.exe -DestinationPath target\x86_64-pc-windows-gnu\release\radius2-windows-x86_64.zip
98+
99+
- name: Upload artifact
100+
uses: actions/upload-artifact@v7
101+
with:
102+
name: radius2-windows-x86_64
103+
path: target/x86_64-pc-windows-gnu/release/radius2-windows-x86_64.zip
78104

79105
release:
80106
name: Create Release
@@ -94,13 +120,15 @@ jobs:
94120
cp artifacts/radius2-linux-x86_64/radius2 release/radius2-linux-x86_64
95121
cp artifacts/radius2-linux-x86_64/*.deb release/
96122
cp artifacts/radius2-macos-x86_64/radius2 release/radius2-macos-x86_64
123+
cp artifacts/radius2-windows-x86_64/radius2-windows-x86_64.zip release/
97124
- name: Create GitHub Release
98125
uses: softprops/action-gh-release@v2
99126
with:
100127
files: |
101128
release/radius2-linux-x86_64
102129
release/*.deb
103130
release/radius2-macos-x86_64
131+
release/radius2-windows-x86_64.zip
104132
name: Release ${{ github.ref_name }}
105133
draft: false
106134
prerelease: false

.github/workflows/rust.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,38 @@ jobs:
5858
path: target/release/radius2
5959

6060
build-windows:
61-
name: Check (Windows)
61+
name: Build (Windows)
6262
runs-on: windows-latest
6363

6464
steps:
6565
- uses: actions/checkout@v6
66-
- name: Check
67-
# boolector-sys needs an external boolector.lib on x86_64-pc-windows-msvc.
68-
# Keep Windows compile coverage without requiring an unsupported final link.
69-
run: cargo check --workspace --all-targets --verbose --release
66+
- name: Setup MSYS2
67+
uses: msys2/setup-msys2@v2
68+
with:
69+
msystem: MINGW64
70+
path-type: inherit
71+
update: true
72+
install: >-
73+
base-devel
74+
curl
75+
git
76+
mingw-w64-x86_64-gcc
77+
mingw-w64-x86_64-cmake
78+
patch
79+
80+
- name: Add Rust GNU target
81+
run: rustup target add x86_64-pc-windows-gnu
82+
83+
- name: Build
84+
shell: msys2 {0}
85+
run: cargo build --package radius2 --target x86_64-pc-windows-gnu --verbose --release
86+
87+
- name: Package
88+
shell: powershell
89+
run: Compress-Archive -Path target\x86_64-pc-windows-gnu\release\radius2.exe -DestinationPath target\x86_64-pc-windows-gnu\release\radius2-windows-x86_64.zip
90+
91+
- name: Upload artifact
92+
uses: actions/upload-artifact@v7
93+
with:
94+
name: radius2-windows-x86_64
95+
path: target/x86_64-pc-windows-gnu/release/radius2-windows-x86_64.zip

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,3 @@ exclude = ["vendor/boolector"]
1919
[profile.release]
2020
lto = true
2121
opt-level=3
22-
23-
[patch.crates-io]
24-
# boolector 0.4.3 compares ftell() output against an i64 constant, which fails on Windows.
25-
boolector = { path = "vendor/boolector" }

radius/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ readme = "README.md"
1313
r2pipe = "0.8.0"
1414
serde_json = "1.0.59"
1515
serde = { version = "1.0.117", features = ["derive"] }
16-
boolector = "0.4.3"
16+
boolector = { path = "../vendor/boolector" }
1717
clap = "2.33.3"
1818
rand = "0.8.4"
1919
colored = "2.0.0"
@@ -22,10 +22,10 @@ colored = "2.0.0"
2222
default = []
2323

2424
[target.'cfg(not(windows))'.dependencies]
25-
boolector = { version = "0.4.3", features = ["vendor-lgl"] }
25+
boolector = { path = "../vendor/boolector", features = ["vendor-lgl"] }
2626

2727
[target.'cfg(windows)'.dependencies]
28-
boolector = "0.4.3"
28+
boolector = { path = "../vendor/boolector" }
2929

3030
[package.metadata.docs.rs]
3131
no-default-features = true

0 commit comments

Comments
 (0)