Feature/vpn 4192 fix domain fronting #3217
This file contains hidden or 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
name: ci-nym-vpn-core-windows | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- "nym-vpn-core/crates/**" | |
- "nym-vpn-core/Cargo.toml" | |
- "nym-vpn-windows/**" | |
- ".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-wireguard-go-windows: | |
uses: ./.github/workflows/build-wireguard-go-windows.yml | |
build: | |
if: github.actor != 'dependabot[bot]' | |
runs-on: custom-windows-11 | |
needs: build-wireguard-go-windows | |
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 | |
with: | |
submodules: true | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ vars.REQUIRED_RUSTC_VERSION }} | |
targets: i686-pc-windows-msvc | |
components: rustfmt, clippy | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ vars.REQUIRED_GOLANG_VERSION }} | |
cache: false | |
- 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: Cache Cargo registry | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('nym-vpn-core/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Cache Cargo build | |
uses: actions/cache@v4 | |
with: | |
path: nym-vpn-core/target/ | |
key: ${{ runner.os }}-cargo-build-${{ hashFiles('nym-vpn-core/Cargo.lock') }}-${{ hashFiles('nym-vpn-core/**/*.rs') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-build-${{ hashFiles('nym-vpn-core/Cargo.lock') }}- | |
${{ runner.os }}-cargo-build- | |
- name: Install GNU make | |
run: | | |
winget list GnuWin32.Make || winget install --disable-interactivity --accept-source-agreements --id GnuWin32.Make | |
echo "${env:ProgramFiles(x86)}\GnuWin32\bin" | Out-File -FilePath "$env:GITHUB_PATH" -Append | |
- name: Install cargo-get | |
uses: baptiste0928/cargo-install@v3 | |
with: | |
crate: cargo-get | |
- name: Download artifacts | |
uses: actions/download-artifact@v5 | |
with: | |
name: wireguard-go_x86_64-pc-windows-msvc | |
path: build/lib/x86_64-pc-windows-msvc | |
- name: Build Windows dependencies | |
working-directory: nym-vpn-core | |
run: make -f Windows.mk winfw CPU_ARCH=AMD64 | |
- name: rustfmt check | |
working-directory: nym-vpn-core | |
run: | | |
cargo fmt --check --all | |
- name: Clippy | |
working-directory: nym-vpn-core | |
run: | | |
cargo clippy --workspace --locked -- -Dwarnings | |
- name: Build | |
working-directory: nym-vpn-core | |
run: | | |
cargo build --verbose --workspace --locked | |
- name: Run tests | |
working-directory: nym-vpn-core | |
run: | | |
cargo test --verbose --workspace --locked |