fix: disable console window for Windows GUI application #394
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
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
# Run automatically every monday | |
schedule: | |
- cron: 1 12 * * 1 | |
name: CI | |
jobs: | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libgtk-4-dev build-essential | |
version: 2 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install stable components | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: clippy | |
- name: Run clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --verbose --release -- -D warnings | |
build_and_test: | |
name: Build and test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['macos-latest', 'ubuntu-22.04', 'windows-latest'] | |
rust: ['stable', '1.57'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: libgtk-4-dev build-essential | |
version: 2 | |
if: startsWith(matrix.os, 'ubuntu-') | |
- name: Install dependencies (macOS) | |
run: brew install gtk4 pkg-config | |
if: matrix.os == 'macos-latest' | |
- name: Install dependencies (Windows) | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: 01f602195983451bc83e72f4214af2cbc495aa94 # 2024.05.24 release | |
runVcpkgInstall: true | |
doNotCache: false | |
if: matrix.os == 'windows-latest' | |
- name: Set PKG_CONFIG (Windows) | |
run: echo "PKG_CONFIG=$env:VCPKG_DEFAULT_BINARY_CACHE/../vcpkg_installed/x64-windows/tools/pkgconf/pkgconf.exe" | Out-File -FilePath $env:GITHUB_ENV -Append | |
if: matrix.os == 'windows-latest' | |
- name: Set PKG_CONFIG_PATH (Windows) | |
run: echo "PKG_CONFIG_PATH=$env:VCPKG_DEFAULT_BINARY_CACHE/../vcpkg_installed/x64-windows/lib/pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append | |
if: matrix.os == 'windows-latest' | |
- name: Set PATH (Windows) | |
run: echo "$env:VCPKG_DEFAULT_BINARY_CACHE/../vcpkg_installed/x64-windows/bin" | Out-File -FilePath $env:GITHUB_PATH -Append | |
if: matrix.os == 'windows-latest' | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Test | |
uses: GabrielBB/xvfb-action@v1 | |
with: | |
run: cargo test --features=test-ui-replay | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: Packetry ${{ matrix.os }} | |
path: | | |
target/release/packetry | |
target/release/packetry.exe | |