SYNERGY-1254 Fix core builds (#7103)

* SYNERGY-1254 Fix core builds

* Changelog

* Uncomment debian9

* Fix artifact name

* Fix workflow name

* Remove -j1 flag

* Turn off pull_request operations

* Add qt for ubuntu core builds

* Switch to python3-yaml

* Update ubuntu

* Cmake automatically manages include_directories

* Remove older fedora versions

* Add DBus to platform to ensure dependancy

* Change to synergy-vcpkg

* build macos

* Remove pull_request

* Add centos 8

* Change container

* Test core builds

* Remove setup

* Remove VCPKG_INSTALLATION_ROOT

* change checkout to use submodules

* Setup newer version of git for ubuntu

* Remove git requirement

* Remove pull_request event
This commit is contained in:
Kyle Bloom 2021-10-21 08:25:57 +01:00 committed by GitHub
parent bcebb6519f
commit 5e2d355a3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 127 additions and 37 deletions

View file

@ -2,22 +2,27 @@ name: CentOS - Core
on: on:
release: release:
types: [created] types: [published]
# pull_request:
jobs: jobs:
build-core-centos: build-core-centos:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: symless/synergy-core:${{ matrix.distro }} container: symless/synergy-vcpkg:${{ matrix.distro }}
env: env:
GIT_COMMIT: ${{ github.sha }} GIT_COMMIT: ${{ github.sha }}
SYNERGY_NO_LEGACY: "1" SYNERGY_NO_LEGACY: "1"
SYNERGY_NO_TESTS: "1" SYNERGY_NO_TESTS: "1"
SYNERGY_STATIC_OPENSSL: "1" SYNERGY_STATIC_OPENSSL: "1"
VCPKG_LIBRARY_LINKAGE: "static"
defaults:
run:
shell: bash
strategy: strategy:
matrix: matrix:
include: distro:
- distro: centos7.6 # - centos7.6
- distro: centos8 - centos8
name: ${{ matrix.distro }} name: ${{ matrix.distro }}
@ -28,14 +33,26 @@ jobs:
run: | run: |
mkdir build mkdir build
cd build cd build
cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr .. cmake3 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
..
. ./version . ./version
make -j make -j
- uses: shallwefootball/s3-upload-action@master - uses: shallwefootball/s3-upload-action@master
if: "github.event_name == 'release'"
with: with:
aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws_bucket: ${{ secrets.AWS_BUCKET }} aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: ./build/bin source_dir: ./build/bin
destination_dir: "./synergy3/latest/${{matrix.distro}}/" destination_dir: "./synergy3/latest/${{matrix.distro}}/"
- uses: actions/upload-artifact@v2
if: "github.event_name == 'pull_request'"
with:
name: ${{ matrix.distro }}
path: build/bin/*
retention-days: 1

View file

@ -1,23 +1,26 @@
name: Debian- Core name: Debian - Core
on: on:
release: release:
types: [created] types: [published]
# pull_request:
jobs: jobs:
build-core-debian: build-core-debian:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: symless/synergy-core:${{ matrix.distro }} container: symless/synergy-vcpkg:${{ matrix.distro }}
env: env:
GIT_COMMIT: ${{ github.sha }} GIT_COMMIT: ${{ github.sha }}
SYNERGY_NO_LEGACY: "1" SYNERGY_NO_LEGACY: "1"
SYNERGY_NO_TESTS: "1" SYNERGY_NO_TESTS: "1"
SYNERGY_STATIC_OPENSSL: "1" SYNERGY_STATIC_OPENSSL: "1"
VCPKG_LIBRARY_LINKAGE: "static"
strategy: strategy:
matrix: matrix:
include: distro:
- distro: debian9 - debian9
- distro: debian10 - debian10
- debian11
name: ${{ matrix.distro }} name: ${{ matrix.distro }}
@ -28,14 +31,25 @@ jobs:
run: | run: |
mkdir build mkdir build
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release .. cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
..
. ./version . ./version
make -j make -j
- uses: shallwefootball/s3-upload-action@master - uses: shallwefootball/s3-upload-action@master
if: "github.event_name == 'release'"
with: with:
aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws_bucket: ${{ secrets.AWS_BUCKET }} aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: ./build/bin source_dir: ./build/bin
destination_dir: "./synergy3/latest/${{matrix.distro}}/" destination_dir: "./synergy3/latest/${{matrix.distro}}/"
- uses: actions/upload-artifact@v2
if: "github.event_name == 'pull_request'"
with:
name: ${{ matrix.distro }}
path: build/bin/*
retention-days: 1

View file

@ -2,25 +2,24 @@ name: Fedora - Core
on: on:
release: release:
types: [created] types: [published]
# pull_request:
jobs: jobs:
build-core-fedora: build-core-fedora:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: symless/synergy-core:${{ matrix.distro }} container: symless/synergy-vcpkg:${{ matrix.distro }}
env: env:
GIT_COMMIT: ${{ github.sha }} GIT_COMMIT: ${{ github.sha }}
SYNERGY_NO_LEGACY: "1" SYNERGY_NO_LEGACY: "1"
SYNERGY_NO_TESTS: "1" SYNERGY_NO_TESTS: "1"
SYNERGY_STATIC_OPENSSL: "1" SYNERGY_STATIC_OPENSSL: "1"
VCPKG_LIBRARY_LINKAGE: "static"
strategy: strategy:
matrix: matrix:
include: distro:
# - distro: fedora28 #Need to install git 2.18+ - fedora33
- distro: fedora29 - fedora34
- distro: fedora30
- distro: fedora33
- distro: fedora34
name: ${{ matrix.distro }} name: ${{ matrix.distro }}
@ -31,14 +30,26 @@ jobs:
run: | run: |
mkdir build mkdir build
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr .. cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
..
. ./version . ./version
make -j make -j
- uses: shallwefootball/s3-upload-action@master - uses: shallwefootball/s3-upload-action@master
if: "github.event_name == 'release'"
with: with:
aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws_bucket: ${{ secrets.AWS_BUCKET }} aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: ./build/bin source_dir: ./build/bin
destination_dir: "./synergy3/latest/${{matrix.distro}}/" destination_dir: "./synergy3/latest/${{matrix.distro}}/"
- uses: actions/upload-artifact@v2
if: "github.event_name == 'pull_request'"
with:
name: ${{ matrix.distro }}
path: build/bin/*
retention-days: 1

View file

@ -2,42 +2,57 @@ name: Ubuntu - Core
on: on:
release: release:
types: [created] types: [published]
# pull_request:
jobs: jobs:
build-core-ubuntu: build-core-ubuntu:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: symless/synergy-core:ubuntu${{ matrix.distro }} container: symless/synergy-vcpkg:${{ matrix.distro }}
env: env:
GIT_COMMIT: ${{ github.sha }} GIT_COMMIT: ${{ github.sha }}
SYNERGY_NO_LEGACY: "1" SYNERGY_NO_LEGACY: "1"
SYNERGY_NO_TESTS: "1" SYNERGY_NO_TESTS: "1"
SYNERGY_STATIC_OPENSSL: "1" SYNERGY_STATIC_OPENSSL: "1"
VCPKG_LIBRARY_LINKAGE: "static"
strategy: strategy:
matrix: matrix:
distro: ["20.04", "21.04", "18.04"] distro:
flag: ["-j"] - ubuntu18.04
include: - ubuntu20.04
- distro: "16.04" - ubuntu21.04
flag: "-j1"
name: ubuntu${{ matrix.distro }} name: ${{ matrix.distro }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with:
submodules: recursive
- name: Build - name: Build
run: | run: |
git submodule
mkdir build mkdir build
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release .. cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake \
..
. ./version . ./version
make ${{ matrix.flag }} make -j
- uses: shallwefootball/s3-upload-action@master - uses: shallwefootball/s3-upload-action@master
if: "github.event_name == 'release'"
with: with:
aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws_bucket: ${{ secrets.AWS_BUCKET }} aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: ./build/bin source_dir: ./build/bin
destination_dir: "./synergy3/latest/Ubuntu_${{matrix.distro}}/" destination_dir: "./synergy3/latest/${{matrix.distro}}/"
- uses: actions/upload-artifact@v2
if: "github.event_name == 'pull_request'"
with:
name: ${{ matrix.distro }}
path: build/bin/*
retention-days: 1

View file

@ -2,7 +2,8 @@ name: macOS - Core
on: on:
release: release:
types: [created] types: [published]
# pull_request:
jobs: jobs:
build-core-macos: build-core-macos:
@ -50,9 +51,17 @@ jobs:
make -j make -j
- uses: shallwefootball/s3-upload-action@master - uses: shallwefootball/s3-upload-action@master
if: "github.event_name == 'release'"
with: with:
aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws_bucket: ${{ secrets.AWS_BUCKET }} aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: ./build/bin source_dir: ./build/bin
destination_dir: "./synergy3/latest/${{ matrix.destination }}/" destination_dir: "./synergy3/latest/${{ matrix.destination }}/"
- uses: actions/upload-artifact@v2
if: "github.event_name == 'pull_request'"
with:
name: ${{ matrix.destination }}
path: build/bin/*
retention-days: 1

View file

@ -2,7 +2,9 @@ name: Raspberry Pi - Core
on: on:
release: release:
types: [created] types: [published]
# pull_request:
jobs: jobs:
build-core-pi: build-core-pi:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -29,9 +31,17 @@ jobs:
make make
- uses: shallwefootball/s3-upload-action@master - uses: shallwefootball/s3-upload-action@master
if: "github.event_name == 'release'"
with: with:
aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws_bucket: ${{ secrets.AWS_BUCKET }} aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: ./build/bin source_dir: ./build/bin
destination_dir: "./synergy3/latest/${{ matrix.destination }}" destination_dir: "./synergy3/latest/${{ matrix.destination }}"
- uses: actions/upload-artifact@v2
if: "github.event_name == 'pull_request'"
with:
name: ${{ matrix.destination }}
path: build/bin/*
retention-days: 1

View file

@ -2,7 +2,8 @@ name: Windows - Core
on: on:
release: release:
types: [created] types: [published]
# pull_request:
jobs: jobs:
build-core-windows: build-core-windows:
@ -52,9 +53,17 @@ jobs:
msbuild synergy-core.sln /p:Configuration=Release msbuild synergy-core.sln /p:Configuration=Release
- uses: anshulrgoyal/upload-s3-action@master - uses: anshulrgoyal/upload-s3-action@master
if: "github.event_name == 'release'"
with: with:
aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }}
aws_bucket: ${{ secrets.AWS_BUCKET }} aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: ./build/bin/Release source_dir: ./build/bin/Release
destination_dir: "./synergy3/latest/Windows_x64/" destination_dir: "./synergy3/latest/Windows_x64/"
- uses: actions/upload-artifact@v2
if: "github.event_name == 'pull_request'"
with:
name: windows
path: build/bin/Release/*
retention-days: 1

View file

@ -26,6 +26,7 @@ Enhancements:
Github Actions: Github Actions:
- #1043 Adding upload to s3 feature on all OSes - #1043 Adding upload to s3 feature on all OSes
- #7098 Add Apple M1 runner - #7098 Add Apple M1 runner
- #7103 Fix core builds
- #7109 Fix build version for M1 builds - #7109 Fix build version for M1 builds
=========== ===========

View file

@ -44,7 +44,6 @@ if (UNIX)
if (NOT APPLE) if (NOT APPLE)
find_package (Qt5 COMPONENTS DBus) find_package (Qt5 COMPONENTS DBus)
include_directories(${Qt5DBus_INCLUDE_DIRS})
target_link_libraries (arch Qt5::DBus) target_link_libraries (arch Qt5::DBus)
endif() endif()
endif() endif()

View file

@ -41,6 +41,11 @@ target_link_libraries(platform client ${libs})
if (UNIX) if (UNIX)
target_link_libraries(platform io net ipc synlib client ${libs}) target_link_libraries(platform io net ipc synlib client ${libs})
if (NOT APPLE)
find_package (Qt5 COMPONENTS DBus)
target_link_libraries (platform Qt5::DBus)
endif()
endif() endif()
if (APPLE) if (APPLE)