android: cred import #1277
Workflow file for this run
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
name: ci-nym-vpn-desktop-rust | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- "nym-vpn-core/**" | |
- "nym-vpn-desktop/**" | |
env: | |
CARGO_TERM_COLOR: always | |
AGENT_ISSELFHOSTED: 1 # https://github.com/actions/setup-go/issues/432 | |
jobs: | |
check: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04-arc, custom-runner-mac-m1, custom-windows-11] | |
runs-on: ${{ matrix.os }} | |
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') | |
run: | | |
sudo apt-get update && sudo apt-get install -y libdbus-1-dev libmnl-dev libnftnl-dev \ | |
protobuf-compiler libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev \ | |
libgtk-3-dev squashfs-tools libayatana-appindicator3-dev git curl gcc g++ make | |
- 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 | |
if: "!contains(matrix.os, 'windows')" | |
id: rust-toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: Install rust toolchain (Windows) | |
if: contains(matrix.os, 'windows') | |
uses: brndnmtthws/rust-action-rustup@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
- name: Set env | |
shell: bash | |
run: | | |
if ${{ contains(matrix.os, 'ubuntu-20.04') }}; then | |
platform_arch=ubuntu-20.04_x86_64 | |
triplet=x86_64-unknown-linux-gnu | |
elif ${{ contains(matrix.os, 'ubuntu-22.04') }}; then | |
platform_arch=ubuntu-22.04_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, 'mac-m1') }}; 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 | |
echo "RUSTFLAGS=-L ${GITHUB_WORKSPACE}/build/lib/${triplet}" >> $GITHUB_ENV | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "stable" | |
- name: Install protoc | |
uses: arduino/setup-protoc@v2 | |
if: contains(matrix.os, 'macos') || contains(matrix.os, 'mac-m1') || contains(matrix.os, 'windows') | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup MSBuild.exe | |
if: contains(matrix.os, 'windows') | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build wireguard | |
shell: bash | |
run: | | |
./wireguard/build-wireguard-go.sh | |
- name: rustfmt check | |
working-directory: nym-vpn-desktop/src-tauri | |
run: cargo fmt --check | |
- name: clippy check | |
working-directory: nym-vpn-desktop/src-tauri | |
run: cargo clippy -- -Dwarnings |