diff --git a/.github/workflows/job-build-linux-centos.yml b/.github/workflows/job-build-linux-centos.yml new file mode 100644 index 000000000..b0be12485 --- /dev/null +++ b/.github/workflows/job-build-linux-centos.yml @@ -0,0 +1,35 @@ +name: CentOS + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-arch64: + runs-on: ubuntu-latest + container: symless/synergy-core:${{ matrix.distro }} + env: + GIT_COMMIT: ${{ github.sha }} + strategy: + matrix: + include: +# - distro: centos7.6 #Need to install git 2.18+ + - 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 + + - name: Run unit test + run: ./build/bin/unittests diff --git a/.github/workflows/job-build-linux-debian.yml b/.github/workflows/job-build-linux-debian.yml new file mode 100644 index 000000000..67fba327b --- /dev/null +++ b/.github/workflows/job-build-linux-debian.yml @@ -0,0 +1,35 @@ +name: Debian + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-arch64: + runs-on: ubuntu-latest + container: symless/synergy-core:${{ matrix.distro }} + env: + GIT_COMMIT: ${{ github.sha }} + strategy: + matrix: + include: +# - distro: debian9 #Need to install git 2.18+ + - 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 + + - name: Run unit test + run: ./build/bin/unittests diff --git a/.github/workflows/job-build-linux-fedora.yml b/.github/workflows/job-build-linux-fedora.yml new file mode 100644 index 000000000..1efbabd3a --- /dev/null +++ b/.github/workflows/job-build-linux-fedora.yml @@ -0,0 +1,36 @@ +name: Fedora + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-arch64: + 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 + + 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 + + - name: Run unit test + run: ./build/bin/unittests diff --git a/.github/workflows/job-build-linux-ubuntu.yml b/.github/workflows/job-build-linux-ubuntu.yml new file mode 100644 index 000000000..45b5c5276 --- /dev/null +++ b/.github/workflows/job-build-linux-ubuntu.yml @@ -0,0 +1,55 @@ +name: Ubuntu + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-arch64: + runs-on: ubuntu-latest + container: symless/synergy-core:${{ matrix.distro }} + env: + GIT_COMMIT: ${{ github.sha }} + strategy: + matrix: + include: + - distro: ubuntu20.04 + - distro: ubuntu19.10 +# - distro: ubuntu18.04 #Need to install git 2.18+ +# - distro: ubuntu16.04 #Need to install git 2.18+ + + name: ${{ matrix.distro }} + + steps: + - uses: actions/checkout@v2 + + - name: Build + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release .. + . ./version + make -j + + - name: Run unit test + run: ./build/bin/unittests + + build_armhf: + runs-on: [self-hosted, armhf] + env: + GIT_COMMIT: ${{ github.sha }} + steps: + - uses: actions/checkout@v2 + + - name: Build + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release .. + . ./version + make -j3 + + - name: Run unit test + run: ./build/bin/unittests \ No newline at end of file diff --git a/.github/workflows/job-build-mac.yml b/.github/workflows/job-build-mac.yml new file mode 100644 index 000000000..ee37bde76 --- /dev/null +++ b/.github/workflows/job-build-mac.yml @@ -0,0 +1,31 @@ +name: Mac + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-arch64: + runs-on: macos-10.15 + + env: + GIT_COMMIT: ${{ github.sha }} + + steps: + - uses: actions/checkout@v2 + + - name: install qt + run: brew install qt + + - name: Build + run: | + mkdir build + cd build + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/local/opt/qt .. + . ./version + make -j + + - name: Run unit test + run: ./build/bin/unittests diff --git a/.github/workflows/job-build-windows.yml b/.github/workflows/job-build-windows.yml new file mode 100644 index 000000000..2f138219d --- /dev/null +++ b/.github/workflows/job-build-windows.yml @@ -0,0 +1,71 @@ +name: Windows + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build-arch64: + runs-on: windows-2019 + + env: + GIT_COMMIT: ${{ github.sha }} + QT_BASE_DIR: ${{ github.workspace }}\deps\Qt + BONJOUR_BASE_DIR: ${{ github.workspace }}\deps\bonjour + QT_VERSION: 5.12.6 + QT_BASE_URL: http://qt.mirror.constant.com/ + + steps: + - uses: actions/checkout@v2 + + - 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: | + pip install aqtinstall + python -m aqt install --outputdir $env:QT_BASE_DIR --base $env:QT_BASE_URL $env:QT_VERSION windows desktop win64_msvc2017_64 + cd $env:QT_BASE_DIR\$env:QT_VERSION\msvc2017_64 + dir + + - name: set QT path + run: echo "::set-env name=CMAKE_PREFIX_PATH::$env:QT_BASE_DIR\$env:QT_VERSION\msvc2017_64\" + + - 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 ".\deps\bonjour" + $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: set Bonjour path + run: echo "::set-env name=BONJOUR_SDK_HOME::$env:BONJOUR_BASE_DIR\BonjourSDK" + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.1 + + - name: Build + 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 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 07eaf1aea..e67bbf1ea 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,3 @@ -trigger: -- master - jobs: - template: CI/job-doxygen.yml