* Use deps script to make life easier for contribs * Make readme more developer friendly * YAML file to describe Linux deps * Silent fail for yaml module (Python 3.6+) * Move Qt install to deps script * Update readme to add Windows command * Fixed Linux package name * Simplify env vars for workflow * Exclude scripts from SonarCloud * Move all deps config to .yml file * Fixed exclude glob * Simplify quickstart * Fixed macOS deps config key name * Fixed bug in Linux config read * Use backslash for consistency * Change SonarCloud path to /build/ * Fixed dep name * Exclude scripts in CMake coverage * Move script coverage exclusion to online config * Use try/except instead of checking return value * Fixed comment typo
75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
name: "Test Windows"
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ github.ref || github.run_id }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test-windows:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 20
|
|
|
|
env:
|
|
GIT_COMMIT: ${{ github.sha }}
|
|
BONJOUR_BASE_DIR: ${{ github.workspace }}\deps\bonjour
|
|
QT_BASE_DIR: ${{ github.workspace }}\deps\Qt
|
|
QT_VERSION: 5.15.2
|
|
|
|
steps:
|
|
- name: Checkout git repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: "recursive"
|
|
|
|
- name: Cache Qt
|
|
id: cache-qt
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ${{ env.QT_BASE_DIR }}
|
|
key: ${{ runner.os }}-Qt_${{ env.QT_VERSION }}
|
|
|
|
- name: Install Qt
|
|
if: steps.cache-qt.outputs.cache-hit != 'true'
|
|
run: python ./scripts/install_deps.py --only qt
|
|
|
|
- name: Cache Bonjour
|
|
id: cache-bonjour
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ${{ env.BONJOUR_BASE_DIR }}
|
|
key: ${{ runner.os }}-Bonjour
|
|
|
|
- name: Install Bonjour SDK
|
|
if: steps.cache-bonjour.outputs.cache-hit != 'true'
|
|
run: |
|
|
New-Item -Force -ItemType Directory -Path "$env:BONJOUR_BASE_DIR"
|
|
$client = new-object System.Net.WebClient
|
|
$client.DownloadFile("https://binaries.symless.com/bonjour/BonjourSDK.zip",".\bonjoursdk.zip")
|
|
[System.IO.Compression.ZipFile]::ExtractToDirectory(".\bonjoursdk.zip", "$env:BONJOUR_BASE_DIR")
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install pyyaml
|
|
python ./scripts/install_deps.py
|
|
|
|
- name: Add msbuild to PATH
|
|
uses: microsoft/setup-msbuild@v1.0.2
|
|
|
|
- name: Build
|
|
env:
|
|
CMAKE_PREFIX_PATH: "${{ env.QT_BASE_DIR }}\\${{ env.QT_VERSION }}\\msvc2019_64\\"
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
. ./version
|
|
msbuild synergy-core.sln /p:Configuration=Release
|
|
|
|
- name: Run unit test
|
|
run: .\build\bin\Release\unittests.exe
|