Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine GitHub workflows to reduce config duplication #7352

Merged
merged 51 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
766aecd
First attempt merging CI test
nbolton Jun 19, 2024
995a882
Remove older versions of Linux
nbolton Jun 19, 2024
e0c1fd3
Blend Docker containers and GitHub runners
nbolton Jun 19, 2024
16047d7
Test older configure/build method for Windows
nbolton Jun 19, 2024
d346776
Re-add old Windows workflow
nbolton Jun 19, 2024
c2f6d26
Use legacy CMake method for more distros
nbolton Jun 19, 2024
51b955d
Rename image to container
nbolton Jun 19, 2024
f03f327
Reduce config dupe
nbolton Jun 19, 2024
4cfdd37
Fixed logic for configure
nbolton Jun 19, 2024
6c3daef
Use newer build command for Windows
nbolton Jun 19, 2024
fdefc97
Move full container name back to matrix (yuk)
nbolton Jun 19, 2024
322b5b2
Move GIT_COMMIT to common env
nbolton Jun 19, 2024
0276c8c
Use more specific Windows runner name
nbolton Jun 19, 2024
11752d4
Fine-grained timeouts for Mac
nbolton Jun 19, 2024
7cf51f7
Fixed unit test path for Windows
nbolton Jun 19, 2024
f30aacf
Rename CI workflow
nbolton Jun 19, 2024
4c8711a
Beginning of macOS dist action
nbolton Jun 19, 2024
f6289c5
Update ChangeLog
nbolton Jun 19, 2024
6df2948
More triggers for CI workflow
nbolton Jun 19, 2024
9ff369a
Attempt to fix test path on Windows
nbolton Jun 19, 2024
7764307
Move dist-macos action
nbolton Jun 19, 2024
ca5908b
Add dir command for testing
nbolton Jun 19, 2024
192191b
Remove `test-` job prefix
nbolton Jun 19, 2024
e63d10c
Bump msbuild action and try modern cmake again
nbolton Jun 19, 2024
4c80a0e
Composite actions don't support defaults... grr
nbolton Jun 19, 2024
05b967e
Remove dir diag command
nbolton Jun 19, 2024
7c6707a
Trying to use Choco again for VS dep
nbolton Jun 19, 2024
9ee32c4
Don't skip ninja
nbolton Jun 19, 2024
edcdf0a
Flush stdout
nbolton Jun 19, 2024
114a939
Add cl to PATH
nbolton Jun 19, 2024
9d3c905
Trying out ilammy/msvc-dev-cmd@v1
nbolton Jun 19, 2024
b29cd4c
Use @v3 checkout for older Linux
nbolton Jun 19, 2024
65eb3be
Fixed comment typo
nbolton Jun 19, 2024
667ba3e
Remove dead scripts
nbolton Jun 19, 2024
c17ccd8
Improve env var names
nbolton Jun 19, 2024
f080489
Run strip from build dir
nbolton Jun 19, 2024
3ee2385
Split out deps script to lib files
nbolton Jun 19, 2024
a76d707
Remove stub action
nbolton Jun 19, 2024
348e4ad
Remove dist step for now
nbolton Jun 19, 2024
dd0e027
Remove cancel-in-progress for now
nbolton Jun 19, 2024
923a941
Remove Bonjour
nbolton Jun 19, 2024
f4d6268
Comment about legacy Linux and cmake presets
nbolton Jun 19, 2024
b801165
Improve comment
nbolton Jun 19, 2024
50fa7c3
Delete old workflows
nbolton Jun 19, 2024
25c6a1c
Fixed imports for dep script
nbolton Jun 19, 2024
f5313a2
Fixed bad var on Windows
nbolton Jun 19, 2024
e3b1e7a
Add shebang and make executable
nbolton Jun 19, 2024
06ceca7
Add g++ to deps
nbolton Jun 19, 2024
749665f
Add if name main gaurd
nbolton Jun 19, 2024
7701152
Add `openssl-devel` to Fedora
nbolton Jun 19, 2024
2eb3343
Add `qt5-qttools-devel` for Fedora
nbolton Jun 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 195 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
name: CI

on:
workflow_dispatch:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches: [master*, release*]

env:
GIT_COMMIT: ${{ github.sha }}

jobs:
windows-2022:
runs-on: windows-2022
timeout-minutes: 20

env:
QT_BASE_DIR: ${{ github.workspace }}\deps\Qt
QT_VERSION: 5.15.2

steps:
- name: Checkout
uses: actions/checkout@v4
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: Install dependencies
run: |
pip install pyyaml
python ./scripts/install_deps.py

- name: Setup VC++ environment
uses: ilammy/msvc-dev-cmd@v1

- name: Configure
env:
CMAKE_PREFIX_PATH: "${{ env.QT_BASE_DIR }}\\${{ env.QT_VERSION }}\\msvc2019_64\\"
run: cmake -B build --preset=windows-release

- name: Build
run: cmake --build build

- name: Test
run: ./build/bin/unittests

macos:
runs-on: ${{ matrix.runtime.os }}
timeout-minutes: ${{ matrix.runtime.timeout }}
name: ${{ matrix.runtime.name }}

defaults:
run:
shell: ${{ matrix.runtime.shell }}

strategy:
matrix:
runtime:
- name: "macos-10-intel"
timeout: 20
os: "macos-14-large"
arch: x64
target: "10.14"
shell: "bash"

- name: "macos-11-m1"
timeout: 10
os: "macos-14"
arch: arm64
target: "11"
shell: "/usr/bin/arch -arch arm64e /bin/bash --noprofile --norc -eo pipefail {0}"

steps:
- name: Setup PATH
run: |
case "$ARCH" in
"arm64")
echo "/opt/homebrew/bin" >> $GITHUB_PATH
;;
esac
env:
ARCH: ${{ matrix.runtime.arch }}

- name: Checkout
uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Install dependencies
run: |
pip install pyyaml
python ./scripts/install_deps.py

- name: Configure
env:
CMAKE_OSX_DEPLOYMENT_TARGET: ${{ matrix.runtime.target }}
run: cmake -B build --preset=macos-release -DCMAKE_PREFIX_PATH=$(brew --prefix qt@5)

- name: Build
run: cmake --build build

- name: Test
run: ./build/bin/unittests

linux:
runs-on: ${{ matrix.distro.runs-on }}
timeout-minutes: 10
name: linux-${{ matrix.distro.name }}
container: ${{ matrix.distro.container }}

strategy:
matrix:
distro:
- name: centos-7.6
container: symless/synergy-core:centos7.6
runs-on: ubuntu-latest
legacy-cmake: true

- name: centos-8
container: symless/synergy-core:centos8
runs-on: ubuntu-latest
legacy-cmake: true

- name: debian-11
container: symless/synergy-core:debian11
runs-on: ubuntu-latest
legacy-cmake: true

- name: debian-12
container: symless/synergy-core:debiansid
runs-on: ubuntu-latest

- name: fedora-37
container: symless/synergy-core:fedora37
runs-on: ubuntu-latest
legacy-cmake: true

- name: fedora-38
container: symless/synergy-core:fedora38
runs-on: ubuntu-latest
legacy-cmake: true

- name: ubuntu-20.04
container: symless/synergy-core:ubuntu20.04
runs-on: ubuntu-latest
legacy-cmake: true

- name: ubuntu-22.04
container: symless/synergy-core:ubuntu22.04
runs-on: ubuntu-latest

- name: ubuntu-24.04
runs-on: ubuntu-24.04
install-deps: true

steps:
# Use @v3 since some older Linux distro versions don't support @v4
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: Install dependencies
if: ${{ matrix.distro.install-deps }}
run: python ./scripts/install_deps.py

- name: Configure
if: ${{ !matrix.distro.legacy-cmake }}
run: cmake -B build --preset=linux-release

# Some older Linux distro versions don't support modern CMake presets.
- name: Configure (legacy)
if: ${{ matrix.distro.legacy-cmake }}
run: cmake -B build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build

- name: Test
run: ./build/bin/unittests
44 changes: 0 additions & 44 deletions .github/workflows/job-test-linux-centos.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/job-test-linux-debian.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/job-test-linux-fedora.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/job-test-linux-ubuntu.yml

This file was deleted.

Loading
Loading