-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,14 @@ jobs: | |
run: ./ci/check-rust.sh | ||
|
||
build-windows: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
config: | ||
- os: windows-latest | ||
arch: x64 | ||
- os: [self-hosted, ARM64, Windows] | ||
arch: arm64 | ||
runs-on: ${{ matrix.config.os }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -127,6 +134,8 @@ jobs: | |
run: git submodule update --init --depth=1 | ||
|
||
- name: Install Protoc | ||
# NOTE: ARM runner already has protoc | ||
if: ${{ matrix.config.arch != 'arm64' }} | ||
uses: arduino/setup-protoc@v3 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -136,6 +145,7 @@ jobs: | |
shell: bash | ||
run: | | ||
hash="$(git grep --recurse-submodules --cached -l '' -- './windows/' \ | ||
| grep -v '\.exe$\|\.md$' \ | ||
| xargs sha1sum \ | ||
| sha1sum \ | ||
| cut -d" " -f1)" | ||
|
@@ -146,13 +156,22 @@ jobs: | |
id: cache-windows-modules | ||
with: | ||
path: | | ||
./windows/*/bin/x64-*/*.dll | ||
./windows/*/bin/x64-*/*.lib | ||
!./windows/*/bin/x64-*/libcommon.lib | ||
!./windows/*/bin/x64-*/libshared.lib | ||
!./windows/*/bin/x64-*/libwfp.lib | ||
./windows/*/bin/${{ matrix.config.arch }}-*/*.dll | ||
./windows/*/bin/${{ matrix.config.arch }}-*/*.lib | ||
!./windows/*/bin/${{ matrix.config.arch }}-*/libcommon.lib | ||
!./windows/*/bin/${{ matrix.config.arch }}-*/libshared.lib | ||
!./windows/*/bin/${{ matrix.config.arch }}-*/libwfp.lib | ||
key: windows-modules-${{ steps.windows-modules-hash.outputs.hash }} | ||
|
||
# The x64 toolchain is needed to build talpid-openvpn-plugin | ||
# TODO: Remove once fixed | ||
- name: Install Rust x64 target | ||
if: ${{ matrix.config.arch == 'arm64' }} | ||
uses: actions-rs/[email protected] | ||
with: | ||
toolchain: stable | ||
target: x86_64-pc-windows-msvc | ||
|
||
- name: Install Rust | ||
uses: actions-rs/[email protected] | ||
with: | ||
|