Skip to content

Feature/vpn 4192 fix domain fronting #1562

Feature/vpn 4192 fix domain fronting

Feature/vpn 4192 fix domain fronting #1562

name: ci-nym-vpn-app-rust
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- ".github/workflows/ci-nym-vpn-app-rust.yml"
- "nym-vpn-app/src-tauri/**"
- "nym-vpn-core/crates/nym-vpn-proto/**"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
AGENT_ISSELFHOSTED: 1 # https://github.com/actions/setup-go/issues/432
jobs:
check:
if: github.actor != 'dependabot[bot]'
strategy:
fail-fast: false
matrix:
os: [arc-linux-latest, custom-macos-15, macos-15, custom-windows-11]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: "Cleanup working directory"
if: contains(matrix.os, 'custom')
shell: bash
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
- name: Install system dependencies
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'arc-linux-latest')
run: |
sudo apt-get update && sudo apt-get install -y libdbus-1-dev libmnl-dev libnftnl-dev \
protobuf-compiler libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev \
libgtk-3-dev squashfs-tools libayatana-appindicator3-dev git curl gcc g++ make unzip \
libsoup-3.0-dev libjavascriptcoregtk-4.1-dev
- name: Support longpaths on windows
if: contains(matrix.os, 'windows')
run: git config --system core.longpaths true
- name: Checkout
uses: actions/checkout@v4
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ vars.REQUIRED_RUSTC_VERSION }}
components: rustfmt, clippy
- name: Install Node
uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
cache-dependency-path: nym-vpn-app/package-lock.json
- name: Install dependencies
working-directory: nym-vpn-app
run: npm ci
- name: Set env
shell: bash
run: |
if ${{ contains(matrix.os, 'ubuntu') || contains(matrix.os, 'arc-linux-latest') }}; then
ubuntu_version=$(lsb_release -rs | tail -n 1)
platform_arch=ubuntu-${ubuntu_version}_x86_64
triplet=x86_64-unknown-linux-gnu
elif ${{ matrix.os == 'macos-12' || matrix.os == 'macos-13' }}; then
platform_arch=macos_x86_64
triplet=x86_64-apple-darwin
elif ${{ contains(matrix.os, 'macos') || contains(matrix.os, 'macos-15') }}; then
# platform_arch=macos_aarch64
platform_arch=macos_universal
triplet=universal-apple-darwin
elif ${{ contains(matrix.os, 'windows') }}; then
triplet=x86_64-pc-windows-msvc
else
echo " ✗ unknown platform/arch [${{ matrix.os }}]"
exit 1
fi
echo " ✓ PLATFORM_ARCH: $platform_arch"
echo " ✓ TRIPLET: $triplet"
echo "PLATFORM_ARCH=$platform_arch" >> $GITHUB_ENV
echo "TRIPLET=$triplet" >> $GITHUB_ENV
- name: Install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup MSBuild.exe
if: contains(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v2
- name: fmt check
working-directory: nym-vpn-app/src-tauri
run: cargo fmt --check
- name: clippy check
working-directory: nym-vpn-app/src-tauri
run: cargo clippy -- -Dwarnings
- name: Generate TS types
working-directory: nym-vpn-app/src-tauri
run: cargo test
- name: Typecheck
working-directory: nym-vpn-app
run: npm run tscheck