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

Install go for mac and win release builds #1077

Merged
merged 15 commits into from
Sep 7, 2024
13 changes: 10 additions & 3 deletions .github/workflows/build-nym-vpn-core-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install rust toolchain
- name: Install Rust toolchain
uses: brndnmtthws/rust-action-rustup@v1
with:
toolchain: stable
Expand All @@ -31,6 +31,11 @@ jobs:
run: |
rustup target add x86_64-apple-darwin

- name: Install Go toochain
uses: actions/setup-go@v5
with:
go-version: "stable"

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
Expand All @@ -55,7 +60,7 @@ jobs:
env:
RUSTFLAGS: "-L ${{ env.WG_GO_LIB_PATH }}"
run: |
cargo build --${{ env.CARGO_TARGET }} --target x86_64-apple-darwin
cargo build --${{ env.CARGO_TARGET }} --target x86_64-apple-darwin --workspace --exclude nym-gateway-probe
ls -la target/x86_64-apple-darwin/release/ || true

- name: Build nym-vpnd with extra flags (native)
Expand Down Expand Up @@ -83,7 +88,9 @@ jobs:
lipo -create -output ${{ env.UPLOAD_DIR_MAC }}/nym-vpn-cli ${{ env.SRC_NATIVE_BINARY }}/nym-vpn-cli ${{ env.SRC_X86_64_BINARY }}/nym-vpn-cli
lipo -create -output ${{ env.UPLOAD_DIR_MAC }}/nym-vpnc ${{ env.SRC_NATIVE_BINARY }}/nym-vpnc ${{ env.SRC_X86_64_BINARY }}/nym-vpnc
lipo -create -output ${{ env.UPLOAD_DIR_MAC }}/nym-vpnd ${{ env.SRC_NATIVE_BINARY }}/nym-vpnd ${{ env.SRC_X86_64_BINARY }}/nym-vpnd
lipo -create -output ${{ env.UPLOAD_DIR_MAC }}/nym-gateway-probe ${{ env.SRC_NATIVE_BINARY }}/nym-gateway-probe ${{ env.SRC_X86_64_BINARY }}/nym-gateway-probe
#lipo -create -output ${{ env.UPLOAD_DIR_MAC }}/nym-gateway-probe ${{ env.SRC_NATIVE_BINARY }}/nym-gateway-probe ${{ env.SRC_X86_64_BINARY }}/nym-gateway-probe
# Native only for nym-gateway-probe
cp ${{ env.SRC_NATIVE_BINARY }}/nym-gateway-probe ${{ env.UPLOAD_DIR_MAC }}/nym-gateway-probe

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-nym-vpn-core-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,17 @@ jobs:
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2

- name: Install rust toolchain
- name: Install Rust toolchain
uses: brndnmtthws/rust-action-rustup@v1
with:
toolchain: stable
components: rustfmt, clippy

- name: Install Go toolchain
uses: actions/setup-go@v5
with:
go-version: "stable"

- name: Download wireguard-go-windows artifacts
uses: actions/download-artifact@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-wireguard-go-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "stable"
# With "stable" here build fails with version mismatch "1.23.1 vs
# 1.23.0". So setting it to explicit version as a quick hack to
# unblock release builds
go-version: 1.23.0
cache-dependency-path: "**/go.sum"

- name: Build wireguard
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build-wireguard-go-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "stable"
# With "stable" here build fails with version mismatch "1.23.1 vs
# 1.23.0". So setting it to explicit version as a quick hack to
# unblock release builds
go-version: 1.23.0
cache-dependency-path: "**/go.sum"

- name: Build wireguard
Expand Down
21 changes: 9 additions & 12 deletions .github/workflows/ci-nym-vpn-core-cargo-deny.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
name: ci-nym-vpn-core-cargo-deny
on:
workflow_dispatch:
pull_request:
paths:
- "nym-vpn-core/**"
workflow_dispatch:

- 'nym-vpn-core/**/Cargo.lock'
- 'nym-vpn-core/**/Cargo.toml'
jobs:
cargo-deny:
runs-on: arc-ubuntu-22.04
runs-on: arc-ubuntu-22.04-dind
steps:
- uses: actions/checkout@v4
- run: |
sudo apt-get update && sudo apt-get install -y curl gcc git
- uses: dtolnay/rust-toolchain@stable
# The cargo-deny action uses docker which we currently can't run on
# arc-ubuntu-22.04, so we have to build manually for now
- run: cargo install --locked cargo-deny
- run: |
cd nym-vpn-core
cargo deny --all-features check licenses bans sources
- uses: EmbarkStudios/cargo-deny-action@v1
with:
manifest-path: ./nym-vpn-core/Cargo.toml
command: check licenses bans sources
arguments: --all-features
4 changes: 4 additions & 0 deletions .github/workflows/publish-nym-vpn-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ jobs:
- if: github.event_name == 'push'
run: echo "TAG_NAME=${{ github.ref_name }}" >> $GITHUB_ENV

- name: Set tag
id: set_tag
run: echo "tag=${{ env.TAG_NAME }}" >> "$GITHUB_OUTPUT"

- name: Generate checksums and create tar.gz archive per platform
run: |
ARCHIVE_LINUX=nym-vpn-core-v${{ steps.workspace-version.outputs.metadata }}_linux_x86_64
Expand Down
Loading