-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-enable windows for nym-vpn-core CI and release #1401
Merged
Merged
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
1d77a80
Re-enable windows for nym-vpn-core CI and release
octol 5df2a1f
Use msys2 to build wireguard-go
pronebird 7af614e
Use msys2 shell
pronebird 200773d
Install build tools
pronebird 1e94efe
Add silent flag
pronebird 4f1bbd4
Try new plugin
pronebird 1e81dbf
use winget --disable-interactivity
pronebird 235c051
Add --passive
pronebird fb12136
Use powershell to set PATH
pronebird 9913242
Use pwshcore
pronebird 18c68fb
ignore error if winget package is already installed
pronebird c75fceb
Use correct value
pronebird 3bd81ab
Build wireguard for windows with msys2
pronebird 8187d1b
Fix msys2 inherit env
pronebird 1a70d66
Remove no longer needed RUSTFLAGS
pronebird 0e15e42
Add msbuild to path
pronebird a2da90d
Fix typo
pronebird dd0de85
Exclude gateway-probe on windows
pronebird ff4cd60
Use CC name instead of full path
pronebird 8aece4b
clippy: fix
pronebird 84fa96c
Disable nym-gateway-probe in windows builds
pronebird e317e43
Extract windows core ci into its own workflow
pronebird 2620062
Exclude gateway-probe.exe
pronebird a40e65f
Move MSYS env into step
pronebird 4ec1d1b
Rename workflow for windows
pronebird d2ee1f4
Update step name
pronebird 7411bfc
Remove winpcap from CI
octol 208f4cf
Remove trailing whitespace
octol b907121
Remove Packet
octol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 |
---|---|---|
@@ -0,0 +1,151 @@ | ||
name: ci-nym-vpn-core-windows | ||
|
||
on: | ||
# push: | ||
pull_request: | ||
paths: | ||
- "nym-vpn-core/**" | ||
- ".github/workflows/ci-nym-vpn-core-windows.yml" | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
AGENT_ISSELFHOSTED: 1 # https://github.com/actions/setup-go/issues/432 | ||
|
||
jobs: | ||
build: | ||
runs-on: custom-windows-11 | ||
|
||
steps: | ||
- name: "Cleanup working directory" | ||
shell: bash | ||
run: | | ||
ls -la ./ | ||
rm -rf ./* || true | ||
rm -rf ./.??* || true | ||
ls -la ./ | ||
|
||
- name: Support longpaths on windows | ||
run: git config --system core.longpaths true | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install rust toolchain | ||
uses: brndnmtthws/rust-action-rustup@v1 | ||
with: | ||
toolchain: stable | ||
components: rustfmt, clippy | ||
|
||
- name: Set env | ||
shell: bash | ||
run: | | ||
triplet=x86_64-pc-windows-msvc | ||
echo "TRIPLET=$triplet" >> $GITHUB_ENV | ||
echo "RUSTFLAGS=-L ${GITHUB_WORKSPACE}/build/lib -Clink-args=/LIBPATH:${GITHUB_WORKSPACE}/build/lib/x64-Debug" >> $GITHUB_ENV | ||
mkdir -p ${GITHUB_WORKSPACE}/build/lib/ | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "stable" | ||
|
||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v3 | ||
with: | ||
version: "21.12" # 3.21.12: the version on ubuntu 24.04. Don't change this! | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install build tools | ||
shell: cmd | ||
run: | | ||
winget install --disable-interactivity --id=Microsoft.VisualStudio.2022.BuildTools --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools;includeRecommended" | ||
if %ERRORLEVEL% EQU -1978335189 ( | ||
exit /b 0 | ||
) | ||
|
||
- name: Update path with vctools | ||
shell: pwsh | ||
run: | | ||
$buildtoolspath = "$Env:ProgramFiles (x86)/Microsoft Visual Studio/2022/BuildTools" | ||
$msbuildpath = "$buildtoolspath/MSBuild/Current/Bin" | ||
echo "Add msbuild dir to path: $msbuildpath" | ||
Add-Content $env:GITHUB_PATH "$msbuildpath" | ||
|
||
$msvctoolspath = "$buildtoolspath/VC/Tools/MSVC" | ||
$contents = Get-ChildItem $msvctoolspath | Select-Object -First 1 | ||
$subdir = $contents[0].Name | ||
$vctoolsdir = "$msvctoolspath/$subdir/bin/Hostx64/x64" | ||
echo "Add vctools dir to path: $vctoolsdir" | ||
Add-Content $env:GITHUB_PATH "$vctoolsdir" | ||
|
||
- name: Setup msys2 | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
update: false | ||
msystem: MINGW64 | ||
install: mingw-w64-x86_64-clang | ||
|
||
- name: Build wireguard | ||
shell: msys2 {0} | ||
env: | ||
MSYS2_PATH_TYPE: inherit | ||
run: | | ||
./wireguard/build-wireguard-go.sh | ||
|
||
- name: Download wintun.zip and winpcap.zip | ||
shell: bash | ||
run: | | ||
curl --output ${GITHUB_WORKSPACE}/wintun.zip https://www.wintun.net/builds/wintun-0.14.1.zip | ||
curl --output ${GITHUB_WORKSPACE}/winpcap.zip https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this one is unused, let me try removing it |
||
|
||
- name: Unzip wintun.zip and winpcap.zip | ||
shell: bash | ||
run: | | ||
unzip ${GITHUB_WORKSPACE}/wintun.zip | ||
unzip ${GITHUB_WORKSPACE}/winpcap.zip | ||
|
||
- name: Move wintun.dll and packet.lib to build directory | ||
shell: bash | ||
run: | | ||
mv ${GITHUB_WORKSPACE}/wintun/bin/amd64/wintun.dll ${GITHUB_WORKSPACE}/build/lib/ | ||
mv ${GITHUB_WORKSPACE}/WpdPack/Lib/x64/Packet.lib ${GITHUB_WORKSPACE}/build/lib/ | ||
|
||
- name: Checkout mullvad libs for Windows | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: nymtech/nym-vpn-mullvad-libs | ||
ref: main | ||
path: "nym-vpn-mullvad-libs" | ||
submodules: true | ||
|
||
- name: Build winfw.dll from mullvad | ||
shell: bash | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/nym-vpn-mullvad-libs | ||
./build-windows-modules.sh | ||
|
||
- name: Move winfw.dll to build directory | ||
shell: bash | ||
run: | | ||
mv ${GITHUB_WORKSPACE}/nym-vpn-mullvad-libs/windows/winfw/bin/x64-Debug ${GITHUB_WORKSPACE}/build/lib/ | ||
|
||
- name: rustfmt check | ||
working-directory: nym-vpn-core | ||
run: | | ||
cargo fmt --check | ||
|
||
- name: Build (excluding gateway probe) | ||
working-directory: nym-vpn-core | ||
run: | | ||
cargo build --verbose --workspace --exclude nym-gateway-probe | ||
|
||
- name: Run tests (excluding gateway probe) | ||
working-directory: nym-vpn-core | ||
run: | | ||
cargo test --verbose --workspace --exclude nym-gateway-probe | ||
|
||
- name: Clippy | ||
working-directory: nym-vpn-core | ||
run: | | ||
cargo clippy -- -Dwarnings |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we didn't need this anymore @pronebird ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see now, it's for winfw et al