fix(vpn-core): throughput tunnel / data-plane #8
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Check clippy | |
| run: cargo clippy --workspace -- -D warnings | |
| - name: Build vpn-core | |
| run: cargo build --package vpn-core | |
| - name: Build vpn-helper | |
| run: cargo build --package vpn-helper | |
| - name: Build vpn-cli | |
| run: cargo build --package vpn-cli | |
| - name: Run tests | |
| run: cargo test --workspace | |
| # macOS: richiede runner Apple (non compilabile da Windows/Linux senza cross-toolchain non supportata da Tauri). | |
| bundle-macos-dmg: | |
| name: Tauri DMG (macOS universal) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin,x86_64-apple-darwin | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: vpn-app/src-tauri -> target | |
| - name: Install Tauri CLI | |
| run: cargo install tauri-cli --locked | |
| - name: Build universal DMG | |
| working-directory: vpn-app | |
| run: cargo tauri build --target universal-apple-darwin --bundles dmg | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: PoliVPN-macos-dmg | |
| path: vpn-app/src-tauri/target/universal-apple-darwin/release/bundle/dmg/*.dmg | |
| if-no-files-found: error |