-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4130 from BOINC/cb_migrate_to_github_actions
[CI] replace Travis and AppVeyor with Github Actions
- Loading branch information
Showing
13 changed files
with
400 additions
and
365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Android | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
schedule: | ||
- cron: '5 12 * * 0' | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.type }}-build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
type: [manager] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 1.9 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.9 | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v2 | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2.1.3 | ||
with: | ||
path: 3rdParty/buildCache | ||
key: android-${{ matrix.type }}-${{ hashFiles('android/*.sh') }} | ||
restore-keys: android-${{ matrix.type }}- | ||
|
||
- name: Build | ||
run: | | ||
./android/ci_build_all.sh | ||
bash <(curl -s https://codecov.io/bash) | ||
- name: Deploy to BinTray | ||
if: ${{ success() }} | ||
env: | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
PULL_REQUEST: ${{ github.event.number }} | ||
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} | ||
run: ./deploy/prepare_deployment.sh android_${{ matrix.type }} && ./deploy/deploy_to_bintray.sh deploy/android_${{ matrix.type }}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Linux | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
schedule: | ||
- cron: '10 12 * * 0' | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.type }}-build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
type: [libs, server, client, apps, manager-with-webview, manager-without-webview, unit-test, integration-test] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get install -y freeglut3-dev libcurl4-openssl-dev libxmu-dev libxi-dev libfcgi-dev libxss-dev libnotify-dev libxcb-util0-dev libgtk2.0-dev libwebkitgtk-dev p7zip-full | ||
- name: Install dependencies for integration testing | ||
if: matrix.type == 'integration-test' | ||
run: | | ||
sudo apt-get install ansible | ||
sudo service mysql stop | ||
./integration_test/installTestSuite.sh | ||
- name: Cache dependencies | ||
uses: actions/cache@v2.1.3 | ||
with: | ||
path: 3rdParty/buildCache | ||
key: linux-${{ matrix.type }}-${{ hashFiles('3rdParty/*Linux*.sh') }} | ||
restore-keys: linux-${{ matrix.type }}- | ||
|
||
- name: Automake | ||
if: ${{ success() }} | ||
run: ./_autosetup | ||
|
||
- name: Configure libs | ||
if: ${{ success() && matrix.type == 'libs' }} | ||
run: ./configure --disable-server --disable-client --disable-manager | ||
|
||
- name: Configure server | ||
if: ${{ success() && matrix.type == 'server' }} | ||
run: ./configure --enable-server --disable-client --disable-manager | ||
|
||
- name: Configure client | ||
if: ${{ success() && matrix.type == 'client' }} | ||
run: ./configure --disable-server --enable-client --disable-manager | ||
|
||
- name: Configure apps | ||
if: success() && matrix.type == 'apps' | ||
run: ./configure --enable-apps --disable-server --disable-client --disable-manager | ||
|
||
- name: Configure manager with webview | ||
if: success() && matrix.type == 'manager-with-webview' | ||
run: ./3rdParty/buildLinuxDependencies.sh && ./configure --disable-server --disable-client --with-wx-prefix=${GITHUB_WORKSPACE}/3rdParty/buildCache/linux | ||
|
||
- name: Configure manager without webview | ||
if: success() && matrix.type == 'manager-without-webview' | ||
run: ./3rdParty/buildLinuxDependencies.sh --disable-webview && ./configure --disable-server --disable-client --with-wx-prefix=${GITHUB_WORKSPACE}/3rdParty/buildCache/linux | ||
|
||
- name: Configure server for unit testing | ||
if: success() && matrix.type == 'unit-test' | ||
run: ./3rdParty/buildLinuxDependencies.sh --gtest-only && ./configure --disable-client --disable-manager --enable-unit-tests CFLAGS="-g -O0" CXXFLAGS="-g -O0" | ||
|
||
- name: Make | ||
if: success() && ! contains(matrix.type, 'integration-test') | ||
run: make | ||
|
||
- name: Execute unit-test and report coverage | ||
if: success() && matrix.type == 'unit-test' | ||
run: ./tests/executeUnitTests.sh --report-coverage | ||
|
||
- name: Execute integration-test | ||
if: success() && matrix.type == 'integration-test' | ||
run: ./integration_test/executeTestSuite.sh | ||
|
||
- name: Deploy to BinTray | ||
if: ${{ success() && ! contains(matrix.type, 'libs') && ! contains(matrix.type, 'server') && ! contains(matrix.type, 'test') }} | ||
env: | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
PULL_REQUEST: ${{ github.event.number }} | ||
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} | ||
run: ./deploy/prepare_deployment.sh linux_${{ matrix.type }} && ./deploy/deploy_to_bintray.sh deploy/linux_${{ matrix.type }}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Linux-MinGW | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
schedule: | ||
- cron: '0 12 * * 0' | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.type }}-build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
type: [libs-mingw, apps-mingw] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get install -y mingw-w64 binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 gcc-mingw-w64 gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 g++-mingw-w64 g++-mingw-w64-i686 g++-mingw-w64-x86-64 p7zip-full | ||
- name: Make libs with mingw | ||
if: success() && matrix.type == 'libs-mingw' | ||
run: cd lib && MINGW=x86_64-w64-mingw32 make -f Makefile.mingw | ||
|
||
- name: Make apps with mingw | ||
if: success() && matrix.type == 'apps-mingw' | ||
run: cd lib && MINGW=x86_64-w64-mingw32 make -f Makefile.mingw wrapper | ||
|
||
- name: Deploy to BinTray | ||
if: ${{ success() && ! contains(matrix.type, 'libs-mingw') }} | ||
env: | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
PULL_REQUEST: ${{ github.event.number }} | ||
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} | ||
run: ./deploy/prepare_deployment.sh win_${{ matrix.type }} && ./deploy/deploy_to_bintray.sh deploy/win_${{ matrix.type }}/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Windows | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
schedule: | ||
- cron: '15 12 * * 0' | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.configuration }}-${{ matrix.platform }}-build | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
platform: [x64] | ||
configuration: [Release] | ||
env: | ||
VCPKG_BINARY_SOURCES: 'clear;files,${{ github.workspace }}\3rdParty\buildCache\windows\vcpkgcache\,readwrite' | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Download GoogleTestAdapter | ||
uses: suisei-cn/actions-download-file@v1 | ||
id: DownloadGoogleTestAdapter | ||
with: | ||
url: "https://github.com/csoltenborn/GoogleTestAdapter/releases/download/v0.18.0/GoogleTestAdapter-0.18.0.vsix" | ||
target: ${{ github.workspace }}\temp\ | ||
|
||
- name: Unzip GoogleTestAdapter | ||
uses: DuckSoft/extract-7z-action@v1.0 | ||
with: | ||
pathSource: ${{ github.workspace }}\temp\GoogleTestAdapter-0.18.0.vsix | ||
pathTarget: ${{ github.workspace }}\temp\GoogleTestAdapter | ||
|
||
- name: Setup msbuild | ||
uses: microsoft/setup-msbuild@v1 | ||
|
||
- name: Setup vstest | ||
uses: darenm/Setup-VSTest@v1 | ||
|
||
- name: Fix vcpkg | ||
run: vcpkg.exe integrate remove | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2.1.3 | ||
with: | ||
path: | | ||
${{ github.workspace }}\3rdParty\buildCache\windows\vcpkgcache\ | ||
${{ github.workspace }}\3rdParty\Windows\cuda\ | ||
key: windows-${{ matrix.platform }}-${{ matrix.configuration }}-${{ hashFiles('win_build/vcpkg_3rdparty_dependencies_vs2019.vcxproj') }} | ||
restore-keys: windows-${{ matrix.platform }}-${{ matrix.configuration }}- | ||
|
||
- name: Build | ||
run: msbuild win_build\boinc_vs2019.sln -p:Configuration=${{ matrix.configuration }} -p:Platform=${{ matrix.platform }} -p:VcpkgTripletConfig=ci -m | ||
|
||
- name: Run tests | ||
run: vstest.console.exe win_build\Build\${{ matrix.platform }}\${{ matrix.configuration }}\unittests.exe /TestAdapterPath:${{ github.workspace }}\temp\GoogleTestAdapter | ||
|
||
- name: Deploy to BinTray | ||
if: ${{ success() }} | ||
env: | ||
BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} | ||
PULL_REQUEST: ${{ github.event.number }} | ||
PULL_REQUEST_SHA: ${{ github.event.pull_request.head.sha }} | ||
platform: ${{ matrix.platform }} | ||
configuration: ${{ matrix.configuration }} | ||
shell: cmd | ||
run: | | ||
call deploy\prepare_deployment.bat | ||
call deploy\deploy_to_bintray.bat |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.