Skip to content

Commit aecb675

Browse files
committed
adding windows build back
Signed-off-by: Daniel Guns <danbguns@gmail.com>
1 parent 45a3f19 commit aecb675

2 files changed

Lines changed: 31 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,20 @@ jobs:
4848
runs-on: ${{ matrix.os }}
4949
strategy:
5050
matrix:
51-
os: [ubuntu-latest, macos-latest]
51+
os: [ubuntu-latest, macos-latest, windows-latest]
5252
steps:
5353
- uses: actions/checkout@v4
5454

5555
- name: Install Rust
5656
uses: dtolnay/rust-toolchain@stable
5757

58+
- name: Install OpenSSL (Windows)
59+
if: runner.os == 'Windows'
60+
run: |
61+
vcpkg install openssl:x64-windows-static-md
62+
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_ENV
63+
echo "OPENSSL_DIR=$env:VCPKG_INSTALLATION_ROOT\packages\openssl_x64-windows-static-md" >> $env:GITHUB_ENV
64+
5865
- name: Cache cargo registry
5966
uses: actions/cache@v4
6067
with:

.github/workflows/release.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,25 @@ jobs:
5151
target: x86_64-unknown-linux-gnu
5252
artifact_name: flux9s
5353
asset_name: flux9s-linux-x86_64.tar.gz
54+
use_tar: true
5455

5556
- os: macos-latest
5657
target: aarch64-apple-darwin
5758
artifact_name: flux9s
5859
asset_name: flux9s-macos-aarch64.tar.gz
60+
use_tar: true
5961

6062
- os: macos-13
6163
target: x86_64-apple-darwin
6264
artifact_name: flux9s
6365
asset_name: flux9s-macos-x86_64.tar.gz
66+
use_tar: true
67+
68+
- os: windows-latest
69+
target: x86_64-pc-windows-msvc
70+
artifact_name: flux9s.exe
71+
asset_name: flux9s-windows-x86_64.zip
72+
use_tar: false
6473

6574
steps:
6675
- uses: actions/checkout@v4
@@ -73,6 +82,13 @@ jobs:
7382
with:
7483
targets: ${{ matrix.target }}
7584

85+
- name: Install OpenSSL (Windows)
86+
if: runner.os == 'Windows'
87+
run: |
88+
vcpkg install openssl:x64-windows-static-md
89+
echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" >> $env:GITHUB_ENV
90+
echo "OPENSSL_DIR=$env:VCPKG_INSTALLATION_ROOT\packages\openssl_x64-windows-static-md" >> $env:GITHUB_ENV
91+
7692
- name: Cache cargo registry
7793
uses: actions/cache@v4
7894
with:
@@ -89,10 +105,16 @@ jobs:
89105
- name: Build
90106
run: cargo build --release --target ${{ matrix.target }}
91107

92-
- name: Create archive
108+
- name: Create archive (Unix)
109+
if: matrix.use_tar
93110
run: |
94111
tar -czf ${{ matrix.asset_name }} -C target/${{ matrix.target }}/release ${{ matrix.artifact_name }}
95112
113+
- name: Create archive (Windows)
114+
if: runner.os == 'Windows'
115+
run: |
116+
Compress-Archive -Path target/${{ matrix.target }}/release/${{ matrix.artifact_name }} -DestinationPath ${{ matrix.asset_name }}
117+
96118
- name: Upload artifact
97119
uses: actions/upload-artifact@v4
98120
with:

0 commit comments

Comments
 (0)