diff --git a/.github/workflows/aws-upload-linux-centos.yml b/.github/workflows/aws-upload-linux-centos.yml new file mode 100644 index 0000000000..29b448df29 --- /dev/null +++ b/.github/workflows/aws-upload-linux-centos.yml @@ -0,0 +1,38 @@ +name: CentOS-Upload + +on: + release: + types: [created] + +jobs: + build-arch64: + runs-on: ubuntu-latest + container: symless/synergy-core:${{ matrix.distro }} + env: + GIT_COMMIT: ${{ github.sha }} + strategy: + matrix: + include: + - distro: centos7.6 + - distro: centos8 + + name: ${{ matrix.distro }} + + steps: + - uses: actions/checkout@v2 + + - name: Build + run: | + mkdir build + cd build + cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr .. + . ./version + make -j + + - uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: ./build/bin + destination_dir: "./synergy3/latest/${{matrix.distro}}/" \ No newline at end of file diff --git a/.github/workflows/aws-upload-linux-debian.yml b/.github/workflows/aws-upload-linux-debian.yml new file mode 100644 index 0000000000..5143f3d031 --- /dev/null +++ b/.github/workflows/aws-upload-linux-debian.yml @@ -0,0 +1,38 @@ +name: Debian-Upload + +on: + release: + types: [created] + +jobs: + build-arch64: + runs-on: ubuntu-latest + container: symless/synergy-core:${{ matrix.distro }} + env: + GIT_COMMIT: ${{ github.sha }} + strategy: + matrix: + include: + - distro: debian9 + - distro: debian10 + + name: ${{ matrix.distro }} + + steps: + - uses: actions/checkout@v2 + + - name: Build + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release .. + . ./version + make -j + + - uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: ./build/bin + destination_dir: "./synergy3/latest/${{matrix.distro}}/" diff --git a/.github/workflows/aws-upload-linux-fedora.yml b/.github/workflows/aws-upload-linux-fedora.yml new file mode 100644 index 0000000000..91f6e6a1f6 --- /dev/null +++ b/.github/workflows/aws-upload-linux-fedora.yml @@ -0,0 +1,41 @@ +name: Fedora-Upload + +on: + release: + types: [created] + +jobs: + upload-to-s3: + runs-on: ubuntu-latest + container: symless/synergy-core:${{ matrix.distro }} + env: + GIT_COMMIT: ${{ github.sha }} + strategy: + matrix: + include: + # - distro: fedora28 #Need to install git 2.18+ + - distro: fedora29 + - distro: fedora30 + - distro: fedora33 + - distro: fedora34 + + name: ${{ matrix.distro }} + + steps: + - uses: actions/checkout@v2 + + - name: Build + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$(pwd)/rpm/BUILDROOT/usr .. + . ./version + make -j + + - uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: ./build/bin + destination_dir: "./synergy3/latest/${{matrix.distro}}/" \ No newline at end of file diff --git a/.github/workflows/aws-upload-linux-ubuntu.yml b/.github/workflows/aws-upload-linux-ubuntu.yml new file mode 100644 index 0000000000..0ec3fbb1fb --- /dev/null +++ b/.github/workflows/aws-upload-linux-ubuntu.yml @@ -0,0 +1,40 @@ +name: Ubuntu-Upload + +on: + release: + types: [created] + +jobs: + upload-to-s3: + runs-on: ubuntu-latest + container: symless/synergy-core:ubuntu${{ matrix.distro }} + env: + GIT_COMMIT: ${{ github.sha }} + strategy: + matrix: + distro: ['20.04', '21.04', '18.04'] + flag: ['-j'] + include: + - distro: '16.04' + flag: '-j1' + + name: ubuntu${{ matrix.distro }} + + steps: + - uses: actions/checkout@v2 + + - name: Build + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release .. + . ./version + make ${{ matrix.flag }} + + - uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: ./build/bin + destination_dir: "./synergy3/latest/Ubuntu_${{matrix.distro}}/" \ No newline at end of file diff --git a/.github/workflows/aws-upload-mac-10.13.yml b/.github/workflows/aws-upload-mac-10.13.yml new file mode 100644 index 0000000000..4d90a21624 --- /dev/null +++ b/.github/workflows/aws-upload-mac-10.13.yml @@ -0,0 +1,45 @@ +name: Mac-10.13-Upload + +on: + release: + types: [created] + +jobs: + build-on-mac-10_13: + runs-on: [self-hosted, macOS, X64, 10.13] + env: + GIT_COMMIT: ${{ github.sha }} + Qt5_DIR: /usr/local/opt/qt/5.15.2/clang_64 + OpenSSL_DIR: /usr/local/ssl + + steps: + - uses: actions/checkout@v2 + + - name: Setup Environment + run: | + python3 -m pip install dmgbuild + + - name: Build SYNERGY + env: + CMAKE_PREFIX_PATH: "${{ env.Qt5_DIR }};${{ env.OpenSSL_DIR }}" + run: | + export PATH="$Qt5_DIR/bin:$PATH" + python3 CI/build_version.py + mkdir build + cd build + cmake \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \ + -DCMAKE_OSX_ARCHITECTURES=x86_64 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CONFIGURATION_TYPES=Release .. + . ./version + make -j + make install/strip + + - uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: ./build/bin + destination_dir: "./synergy3/latest/macOS_10.13/" \ No newline at end of file diff --git a/.github/workflows/aws-upload-mac-10.15.yml b/.github/workflows/aws-upload-mac-10.15.yml new file mode 100644 index 0000000000..3982828896 --- /dev/null +++ b/.github/workflows/aws-upload-mac-10.15.yml @@ -0,0 +1,39 @@ +name: Mac-10.15-Upload + +on: + release: + types: [created] + +jobs: + build-arch64: + runs-on: macos-10.15 + + env: + GIT_COMMIT: ${{ github.sha }} + + steps: + - uses: actions/checkout@v2 + + - name: Install brew dependencies + run: | + brew list qt5 &>/dev/null || brew install qt5 + brew list openssl &>/dev/null || brew install openssl + + - name: Build + run: | + mkdir build + cd build + cmake \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_PREFIX_PATH="$(brew --prefix qt5);$(brew --prefix openssl)" .. + . ./version + make -j + + - uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: ./build/bin + destination_dir: "./synergy3/latest/macOS_10.15/" \ No newline at end of file diff --git a/.github/workflows/aws-upload-raspberry.yml b/.github/workflows/aws-upload-raspberry.yml new file mode 100644 index 0000000000..314db30925 --- /dev/null +++ b/.github/workflows/aws-upload-raspberry.yml @@ -0,0 +1,30 @@ +name: Raspberry Pi - Upload + +on: + release: + types: [created] +jobs: + test-on-pi: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [[self-hosted, linux, ARM, pi-3], [self-hosted, linux, ARM64, pi-4]] + env: + GIT_COMMIT: ${{ github.sha }} + + steps: + - uses: actions/checkout@v2 + + - name: Build + run: | + mkdir -p build; cd build + cmake -DCMAKE_BUILD_TYPE=Release .. + make + + - uses: shallwefootball/s3-upload-action@master + with: + aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: ./build/bin + destination_dir: "./synergy3/latest/Raspberry/${{ matrix.os[3] }}_${{ matrix.os[2]}}/" \ No newline at end of file diff --git a/.github/workflows/aws-upload-windows.yml b/.github/workflows/aws-upload-windows.yml new file mode 100644 index 0000000000..236226cbc0 --- /dev/null +++ b/.github/workflows/aws-upload-windows.yml @@ -0,0 +1,101 @@ +name: Windows-Upload + +on: + release: + types: [created] + +jobs: + build: + runs-on: windows-2019 + + env: + GIT_COMMIT: ${{ github.sha }} + BONJOUR_BASE_DIR: ${{ github.workspace }}\deps\bonjour + QT_BASE_DIR: ${{ github.workspace }}\deps\Qt + QT_VERSION: 5.12.6 + QT_BASE_URL: http://qt.mirror.constant.com/ + QT_LIB_DIR: ${{ github.workspace }}\deps\Qt\5.12.6 + + strategy: + matrix: + arch: ['x64'] + + steps: + - uses: actions/checkout@v2 + + - name: Set up QT variables + run: | + if ('${{ matrix.arch }}' -eq 'x64') + { + Write-Output "::set-output name=QT_ARCH::win64_msvc2017_64" + Write-Output "::set-output name=QT_DIR::msvc2017_64" + Write-Output "::set-output name=OPEN_SSL_DIR::C:\\Program Files\\OpenSSL-Win64" + } + else + { + Write-Output "::set-output name=QT_ARCH::win32_msvc2017" + Write-Output "::set-output name=QT_DIR::msvc2017" + Write-Output "::set-output name=OPEN_SSL_DIR::C:\\Program Files (x86)\\OpenSSL-Win32" + } + id: qt-setup + + - name: Cache Qt + id: cache-qt + uses: actions/cache@v1 + with: + path: ${{ env.QT_BASE_DIR }} + key: ${{ runner.os }}-Qt_${{ env.QT_VERSION }}-${{ steps.qt-setup.outputs.QT_ARCH }} + + - name: LOG Qt + run: | + Write-Output "matrix arch ${{ matrix.arch }}" + Write-Output "python -m aqt install --outputdir $env:QT_BASE_DIR --base $env:QT_BASE_URL $env:QT_VERSION windows desktop ${{ steps.qt-setup.outputs.QT_ARCH }}" + + + - name: Install Qt + if: steps.cache-qt.outputs.cache-hit != 'true' + run: | + pip install aqtinstall + python -m aqt install --outputdir $env:QT_BASE_DIR --base $env:QT_BASE_URL $env:QT_VERSION windows desktop ${{ steps.qt-setup.outputs.QT_ARCH }} + + + - 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 OpenSSL + run: | + choco uninstall openssl -y --ignore-autouninstaller-failure --no-progress + choco install openssl -y --force${{ matrix.arch }} --no-progress + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Build + env: + CMAKE_PREFIX_PATH: "${{ env.QT_LIB_DIR }}\\${{ steps.qt-setup.outputs.QT_DIR }}\\;${{ steps.qt-setup.outputs.OPEN_SSL_DIR }}" + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release .. + . ./version + msbuild synergy-core.sln /p:Configuration=Release + + - uses: anshulrgoyal/upload-s3-action@master + with: + aws_key_id: ${{ secrets.AWS_S3_UPLOAD_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_S3_UPLOAD_SECRET }} + aws_bucket: ${{ secrets.AWS_BUCKET }} + source_dir: ./build/bin + destination_dir: "./synergy3/latest/Windows_${{ matrix.arch }}/" diff --git a/.github/workflows/job-test-linux-centos.yml b/.github/workflows/job-test-linux-centos.yml index b0be12485d..821fc76a33 100644 --- a/.github/workflows/job-test-linux-centos.yml +++ b/.github/workflows/job-test-linux-centos.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: include: -# - distro: centos7.6 #Need to install git 2.18+ + - distro: centos7.6 - distro: centos8 name: ${{ matrix.distro }} diff --git a/.github/workflows/job-test-linux-debian.yml b/.github/workflows/job-test-linux-debian.yml index 67fba327ba..b6ecec35b5 100644 --- a/.github/workflows/job-test-linux-debian.yml +++ b/.github/workflows/job-test-linux-debian.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: include: -# - distro: debian9 #Need to install git 2.18+ + - distro: debian9 - distro: debian10 name: ${{ matrix.distro }} @@ -30,6 +30,6 @@ jobs: cmake -DCMAKE_BUILD_TYPE=Release .. . ./version make -j - + - name: Run unit test run: ./build/bin/unittests diff --git a/.github/workflows/job-test-linux-ubuntu.yml b/.github/workflows/job-test-linux-ubuntu.yml index beec526f3b..9e50aa27c0 100644 --- a/.github/workflows/job-test-linux-ubuntu.yml +++ b/.github/workflows/job-test-linux-ubuntu.yml @@ -2,36 +2,37 @@ name: Ubuntu on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: build-arch64: runs-on: ubuntu-latest - container: symless/synergy-core:${{ matrix.distro }} + container: symless/synergy-core:ubuntu${{ matrix.distro }} env: GIT_COMMIT: ${{ github.sha }} strategy: matrix: + distro: ['20.04', '21.04', '18.04'] + flag: ['-j'] include: - - distro: ubuntu20.04 - - distro: ubuntu21.04 -# - distro: ubuntu18.04 #Need to install git 2.18+ -# - distro: ubuntu16.04 #Need to install git 2.18+ + - distro: '16.04' + flag: '-j1' - name: ${{ matrix.distro }} + + name: ubuntu${{ matrix.distro }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Build - run: | - mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Release .. - . ./version - make -j + - name: Build + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release .. + . ./version + make ${{ matrix.flag }} - - name: Run unit test - run: ./build/bin/unittests + - name: Run unit test + run: ./build/bin/unittests \ No newline at end of file diff --git a/ChangeLog b/ChangeLog index 2ddd9a8370..54566ead63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ Enhancements: - #7068 Add Synergy restart when settings changed - #7072 Ability to run synergy as a pre-login agent - #7074 Add Synergy restart when server settings changed + +Github Actions: +- #1043 Adding upload to s3 feature on all OSes =========== v1.14.1-rc