Skip to content
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

build: add windows build #54

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/build-wireguard-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- ubuntu-22.04
- macos-latest
- custom-runner-mac-m1
- windows-latest

# reusable workflow
workflow_call:
Expand Down Expand Up @@ -51,12 +52,17 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup msbuild
if: contains(inputs.os, 'windows')
uses: microsoft/setup-msbuild@v1.1

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 'stable'

- name: Build wireguard
shell: bash
run: ./wireguard/build-wireguard-go.sh

- name: Upload artifacts (ubuntu-22.04 x86_64)
Expand Down Expand Up @@ -94,3 +100,12 @@ jobs:
path: |
build/lib/aarch64-apple-darwin
retention-days: 1

- name: Upload artifacts (windows x86_64)
uses: actions/upload-artifact@v4
if: contains(inputs.os, 'windows')
with:
name: wireguard-go_windows_x86_64
path: |
build/lib/x86_64-pc-windows-msvc
retention-days: 1
16 changes: 13 additions & 3 deletions .github/workflows/ci-nym-vpn-desktop-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
build-wireguard-go:
strategy:
matrix:
os: [ubuntu-22.04, custom-runner-mac-m1]
# os: [ubuntu-22.04, custom-runner-mac-m1]
os: [windows-latest]
uses: ./.github/workflows/build-wireguard-go.yml
with:
os: ${{ matrix.os }}
Expand All @@ -24,7 +25,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, custom-runner-mac-m1]
# os: [ubuntu-22.04, custom-runner-mac-m1]
os: [windows-latest]
runs-on: ${{ matrix.os }}
env:
CARGO_TERM_COLOR: always
Expand All @@ -33,6 +35,7 @@ jobs:
steps:
- name: 'Cleanup working directory'
if: contains(matrix.os, 'custom')
shell: bash
run: |
ls -la ./
rm -rf ./* || true
Expand All @@ -47,6 +50,7 @@ jobs:
nym-vpn-lib

- name: Set env
shell: bash
run: |
if ${{ contains(matrix.os, 'ubuntu-22.04') }}; then
platform_arch=ubuntu-22.04_x86_64
Expand All @@ -56,6 +60,8 @@ jobs:
platform_arch=macos_aarch64
elif ${{ contains(matrix.os, 'macos') }}; then
platform_arch=macos_x86_64
elif ${{ contains(matrix.os, 'windows') }}; then
platform_arch=windows_x86_64
else
echo " ✗ unknown platform/arch [${{ matrix.os }}]"
exit 1
Expand Down Expand Up @@ -89,9 +95,13 @@ jobs:
protobuf-compiler libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev \
libgtk-3-dev squashfs-tools libayatana-appindicator3-dev

- name: Enable git long-paths
if: contains(matrix.os, 'windows')
run: git config --system core.longpaths true

- name: Install Protoc
uses: arduino/setup-protoc@v2
if: contains(matrix.os, 'macos') || contains(matrix.os, 'mac-m1')
if: contains(matrix.os, 'macos') || contains(matrix.os, 'mac-m1') || contains(matrix.os, 'windows')
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
49 changes: 34 additions & 15 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ jobs:
build-wireguard-go:
strategy:
matrix:
os:
[
ubuntu-22.04-16-core,
ubuntu-20.04-16-core,
macos-latest,
custom-runner-mac-m1,
]
# os:
# [
# ubuntu-22.04-16-core,
# ubuntu-20.04-16-core,
# macos-latest,
# custom-runner-mac-m1,
# ]
os: [windows-latest]
uses: ./.github/workflows/build-wireguard-go.yml
with:
os: ${{ matrix.os }}
Expand All @@ -26,13 +27,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os:
[
ubuntu-22.04-16-core,
ubuntu-20.04-16-core,
macos-latest,
custom-runner-mac-m1,
]
# os:
# [
# ubuntu-22.04-16-core,
# ubuntu-20.04-16-core,
# macos-latest,
# custom-runner-mac-m1,
# ]
os: [windows-latest]

runs-on: ${{ matrix.os }}
env:
# TODO use repo secrets instead
Expand All @@ -43,6 +46,7 @@ jobs:
steps:
- name: "Cleanup working directory"
if: contains(matrix.os, 'custom')
shell: bash
run: |
ls -la ./
rm -rf ./* || true
Expand All @@ -64,6 +68,7 @@ jobs:
libgtk-3-dev squashfs-tools libayatana-appindicator3-dev

- name: Set env
shell: bash
run: |
if ${{ contains(matrix.os, 'ubuntu-22.04') }}; then
platform_arch=ubuntu-22.04_x86_64
Expand All @@ -73,6 +78,8 @@ jobs:
platform_arch=macos_aarch64
elif ${{ contains(matrix.os, 'macos') }}; then
platform_arch=macos_x86_64
elif ${{ contains(matrix.os, 'windows') }}; then
platform_arch=windows_x86_64
else
echo " ✗ unknown platform/arch [${{ matrix.os }}]"
exit 1
Expand Down Expand Up @@ -112,17 +119,29 @@ jobs:

- name: Install Protoc
uses: arduino/setup-protoc@v2
if: contains(matrix.os, 'macos') || contains(matrix.os, 'mac-m1')
if: contains(matrix.os, 'macos') || contains(matrix.os, 'mac-m1') || contains(matrix.os, 'windows')
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare desktop build
shell: bash
run: mkdir nym-vpn-desktop/dist

- name: Install node dependencies
working-directory: nym-vpn-desktop
run: npm i

- name: Enable git long-paths
if: contains(matrix.os, 'windows')
run: git config --system core.longpaths true

- name: Setup Perl
uses: shogo82148/actions-setup-perl@v1
if: contains(matrix.os, 'windows')
with:
perl-version: '5.38'
distribution: strawberry

- name: Build desktop client
working-directory: nym-vpn-desktop/src-tauri
env:
Expand Down
Loading
Loading