Commit ebc507e0 authored by Christian Beer's avatar Christian Beer
Browse files

[CI] replace Travis and AppVeyor with Github Actions

This consolidates the different CI builds on one platform that provides support for the major three operating systems we build on (Linux, Windows, MacOS). The nomenclature and syntax is a bit different but it has the same functionality.
This commit introduces the Linux and Windows based workflows. All the build artifacts can now be downloaded from [bintray](https://bintray.com/beta/#/boinc/boinc-ci?tab=files

). The CI workflows run for every pull request, every merge into the master branch and every Sunday around 12:00 (GMT).
Every first Sunday in a month a cleanup Script is run to delete old artifacts from Bintray. Artifacts from closed/merged pull requests get deleted then. Artifacts from weekly builds and merges into the master branch older than 6 months get deleted too.
Co-authored-by: default avatarVitalii Koshura <lestat.de.lionkur@gmail.com>
parent 89fa2cf0
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 }}/
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 }}/
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 }}/
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
language: cpp
os: linux
compiler:
- gcc
branches:
only:
- master
- coverity_scan
dist: xenial
jdk:
- oraclejdk9
cache:
timeout: 600
directories:
- 3rdParty/buildCache
addons:
coverity_scan:
project:
name: "BOINC/boinc"
description: "Build submitted via Travis CI"
notification_email: christian.beer@posteo.de
build_command_prepend: "./configure --enable-apps"
build_command: "make -j 4"
branch_pattern: coverity_scan
env:
global:
# secret API keys for Coverity and bintray
- secure: "Rd++Hyurnwd/tvjH0PX2seO3QUZ6WOf8bSB2ZkKPfZCU6+tXVMvloyog6Mlc7vl0m3WFAzw24MDtNLFBUktRsVXOkqDup1s6PdkwwcwG+5wAnydN+kXF9PcqKyOi0xJvl48Wji+r92Y9SCLzPnQGjZg70xHET22bDZHt2FsjP80="
- secure: dYJhIQi9mB00HsyjNEbyyeh7ChHxbg9o6dkBvub/4dRwJKN+KAReU7yHshUTpHI+Nn4TdCjpwHcDMDOklRTSeUFz79jGEmCVqvnz0DynZFroryX3rdAnc/kW4QkupgLZk4JKCN0JRPOM/j9RS2zLxkqrDc7gibF7BNgIhu1jUXk=
jobs:
- BOINC_TYPE=libs
- BOINC_TYPE=server
- BOINC_TYPE=client
- BOINC_TYPE=apps
- BOINC_TYPE=manager
- BOINC_TYPE=libs-mingw
- BOINC_TYPE=apps-mingw
- BOINC_TYPE=unit-test
jobs:
fast_finish: true
include:
- language: php
os: linux
php: 7.0
env:
- BOINC_TYPE=integration-test
- language: cpp
os: osx
env: BOINC_TYPE=manager-osx
- language: android
android:
components:
- build-tools-29.0.3
- android-29
- extra-google-m2repository
- extra-android-m2repository
env: BOINC_TYPE=manager-android
before_install:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then ( sudo apt-get -qq update ) fi
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then ( sudo apt-get install -y freeglut3-dev libxmu-dev libxi-dev libfcgi-dev libxss-dev libnotify-dev libxcb-util0-dev libgtk2.0-dev libwebkitgtk-dev 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 realpath p7zip-full ) fi
- if [[ "${BOINC_TYPE}" == "integration-test" ]]; then ( sudo apt-get install ansible/xenial-backports; sudo service mysql stop; ) fi
before_script:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then ( ./_autosetup ) fi
- if [[ "${BOINC_TYPE}" == "integration-test" ]]; then ( ./integration_test/installTestSuite.sh ) fi
script:
- if [[ "${BOINC_TYPE}" == "libs" ]]; then ( ./configure --disable-server --disable-client --disable-manager && make ) fi
- if [[ "${BOINC_TYPE}" == "server" ]]; then ( ./configure --disable-client --disable-manager && make ) fi
- if [[ "${BOINC_TYPE}" == "client" ]]; then ( ./configure --disable-server --disable-manager && make ) fi
- if [[ "${BOINC_TYPE}" == "apps" ]]; then ( ./configure --enable-apps --disable-server --disable-client --disable-manager && make ) fi
- if [[ "${BOINC_TYPE}" == "manager" && "${TRAVIS_OS_NAME}" == "linux" ]]; then ( ./3rdParty/buildLinuxDependencies.sh && ./configure --disable-server --disable-client --with-wx-prefix=${TRAVIS_BUILD_DIR}/3rdParty/buildCache/linux && make ) fi
- if [[ "${BOINC_TYPE}" == "manager" && "${TRAVIS_OS_NAME}" == "linux" ]]; then ( make distclean && ./3rdParty/buildLinuxDependencies.sh --disable-webview --cache_dir ${TRAVIS_BUILD_DIR}/3rdParty/buildCache/linux2 && ./configure --disable-server --disable-client --with-wx-prefix=${TRAVIS_BUILD_DIR}/3rdParty/buildCache/linux2 && make ) fi
- if [[ "${BOINC_TYPE}" == "libs-mingw" ]]; then ( cd lib && MINGW=x86_64-w64-mingw32 make -f Makefile.mingw ) fi
- if [[ "${BOINC_TYPE}" == "apps-mingw" ]]; then ( cd lib && MINGW=x86_64-w64-mingw32 make -f Makefile.mingw wrapper ) fi
- if [[ "${BOINC_TYPE}" == "manager-osx" ]]; then ( ./3rdParty/buildMacDependencies.sh -q && ./mac_build/buildMacBOINC-CI.sh --no_shared_headers ) fi
- if [[ "${BOINC_TYPE}" == "manager-android" ]]; then ( cd android && ./travis_build_all.sh && cd BOINC && ./gradlew clean assemble jacocoTestReportDebug && bash <(curl -s https://codecov.io/bash) && cd ../../ ) fi
- if [[ "${BOINC_TYPE}" == "unit-test" ]]; then ( ./3rdParty/buildLinuxDependencies.sh --gtest-only && ./configure --disable-client --disable-manager --enable-unit-tests CFLAGS="-g -O0" CXXFLAGS="-g -O0" && make && ./tests/executeUnitTests.sh --report-coverage ) fi
- if [[ "${BOINC_TYPE}" == "integration-test" ]]; then ( ./integration_test/executeTestSuite.sh ) fi
after_success:
- ./deploy/prepare_deployment.sh ${BOINC_TYPE} deploy/${BOINC_TYPE}/ && ./deploy/deploy_to_bintray.sh deploy/${BOINC_TYPE}/
# Status
[![Build Status](https://travis-ci.org/BOINC/boinc.svg?branch=master)](https://travis-ci.org/BOINC/boinc) [![Build status](https://ci.appveyor.com/api/projects/status/9dgoc9h5ppos8vcy/branch/master?svg=true)](https://ci.appveyor.com/project/BOINC/boinc/branch/master) [![Coverity Scan Build Status](https://scan.coverity.com/projects/4226/badge.svg)](https://scan.coverity.com/projects/boinc-boinc) [![codecov](https://codecov.io/gh/BOINC/boinc/branch/master/graph/badge.svg)](https://codecov.io/gh/BOINC/boinc) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/BOINC/boinc/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/BOINC/boinc/?branch=master)
![Build Status](https://github.com/BOINC/boinc/workflows/Linux/badge.svg) ![Build Status](https://github.com/BOINC/boinc/workflows/Windows/badge.svg) ![Build Status](https://github.com/BOINC/boinc/workflows/Android/badge.svg) ![Build Status](https://github.com/BOINC/boinc/workflows/Linux-MinGW/badge.svg) [![Coverity Scan Build Status](https://scan.coverity.com/projects/4226/badge.svg)](https://scan.coverity.com/projects/boinc-boinc) [![codecov](https://codecov.io/gh/BOINC/boinc/branch/master/graph/badge.svg)](https://codecov.io/gh/BOINC/boinc) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/BOINC/boinc/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/BOINC/boinc/?branch=master)
# Social
......@@ -18,16 +18,16 @@ Read about all the [ways you can help](CONTRIBUTING.md)
### Note
The University of California holds the copyright on all BOINC source code. By
submitting contributions to the BOINC code, you irrevocably assign all right,
title, and interest, including copyright and all copyright rights, in such
contributions to The Regents of the University of California, who may then
use the code for any purpose that it desires.
The University of California holds the copyright on all BOINC source code. By
submitting contributions to the BOINC code, you irrevocably assign all right,
title, and interest, including copyright and all copyright rights, in such
contributions to The Regents of the University of California, who may then
use the code for any purpose that it desires.
## Reporting Security Issues
We strongly encourage you to report security problems to our private mailing
list and not by posting an issue. You can do this by sending an email to
boinc_pmc@googlegroups.com. This will be privately sent to the members of the
We strongly encourage you to report security problems to our private mailing
list and not by posting an issue. You can do this by sending an email to
boinc_pmc@googlegroups.com. This will be privately sent to the members of the
BOINC Project Management Committee.
# License
......
......@@ -7,9 +7,27 @@ set -e
# Script to compile everything BOINC needs for Android
# check working directory because the script needs to be called like: ./android/ci_build_all.sh
if [ ! -d "android" ]; then
echo "start this script in the source root directory"
exit 1
fi
cd android
echo '===== BOINC Client for all platforms build start ====='
./buildAndroidBOINC-CI.sh --cache_dir "$ANDROID_TC" --build_dir "$BUILD_DIR" --silent --ci --arch arm
./buildAndroidBOINC-CI.sh --cache_dir "$ANDROID_TC" --build_dir "$BUILD_DIR" --silent --ci --arch arm64
./buildAndroidBOINC-CI.sh --cache_dir "$ANDROID_TC" --build_dir "$BUILD_DIR" --silent --ci --arch x86
./buildAndroidBOINC-CI.sh --cache_dir "$ANDROID_TC" --build_dir "$BUILD_DIR" --silent --ci --arch x86_64
echo '===== BOINC for all platforms build done ====='
echo '===== BOINC Client for all platforms build done ====='
cd BOINC
echo '===== BOINC Manager build start ====='
./gradlew clean assemble jacocoTestReportDebug
echo '===== BOINC Manager build done ====='
# NOTE: settings in this file have precedence over settings on the website
image:
- Visual Studio 2013
- Visual Studio 2019
matrix:
fast_finish: true
exclude:
- platform: x64
TOOLCHAIN_VERSION: 10.0
- platform: Win32
TOOLCHAIN_VERSION: 10.0
image: Visual Studio 2019
- TOOLCHAIN_VERSION: 12.0
image: Visual Studio 2019
- platform: Win32
TOOLCHAIN_VERSION: 16.0
- platform: x64
TOOLCHAIN_VERSION: 16.0
image: Visual Studio 2013
platform:
- Win32
- x64
pull_requests:
do_not_increment_build_number: true
notifications:
- provider: Email
to:
- boinc_cvs@ssl.berkeley.edu
on_build_success: false
on_build_failure: true
on_build_status_changed: true
branches:
only:
- master
skip_tags: true
skip_commits:
files:
- .github/
- 3rdParty/*.sh
- android/
- client/android/
- client/os2/
- client/scripts/
- clientgui/gtk/
- clientgui/mac/
- clientgui/skins/
- db/
- doc/
- drupal/
- html/
- integration_test
- lib/mac/
- locale/
- m4/
- mac_build/
- mac_installer/
- packages/
- py/
- stripchart/
- tests/
- tools/
- vda/
- xcompile/
configuration:
- Release
environment:
matrix:
- TOOLCHAIN_VERSION: 10.0
solution_name: win_build\boinc_vs2010.sln
depends_zip_path: https://boinc.berkeley.edu/dl/boinc_depends/boinc_depends_win_vs2010.zip
depends_path: C:\projects\boinc_depends_win_vs2010
- TOOLCHAIN_VERSION: 12.0
solution_name: win_build\boinc_vs2013.sln
depends_zip_path: https://boinc.berkeley.edu/dl/boinc_depends/boinc_depends_win_vs2013.zip
depends_path: C:\projects\boinc_depends_win_vs2013
- TOOLCHAIN_VERSION: 16.0
solution_name: win_build\boinc_vs2019.sln
BINTRAY_API_KEY:
secure: kZI9k0Kh2bFSCbXfkz+J16fGNAee1ToRMl10D8QPQsKpC2PqhF/uVMpd6gRC+OSI
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma2 -mx=9 -ms=on"
cache:
- C:\projects\boinc_depends_win_vs2010 -> appveyor.yml, win_build\load_dependencies.bat
- C:\projects\boinc_depends_win_vs2013 -> appveyor.yml, win_build\load_dependencies.bat
- '%LOCALAPPDATA%\vcpkg\archives -> appveyor.yml'
before_build:
- if %TOOLCHAIN_VERSION%==10.0 call win_build\load_dependencies.bat %depends_zip_path% %depends_path% %platform% %configuration%
- if %TOOLCHAIN_VERSION%==12.0 call win_build\load_dependencies.bat %depends_zip_path% %depends_path% %platform% %configuration%
- if %TOOLCHAIN_VERSION%==10.0 call "%VS100COMNTOOLS%\vsvars32.bat"
- if %TOOLCHAIN_VERSION%==10.0 call git apply boinc_vs2010.sln.ci.patch
- if %TOOLCHAIN_VERSION%==12.0 call "%VS120COMNTOOLS%\vsvars32.bat"
- if %TOOLCHAIN_VERSION%==12.0 call rmdir /S /Q %localappdata%\Microsoft\VisualStudio\%TOOLCHAIN_VERSION%\ComponentModelCache
- if %TOOLCHAIN_VERSION%==16.0 call "C:\Tools\vcpkg\vcpkg.exe" integrate remove
- if %TOOLCHAIN_VERSION%==16.0 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\vsdevcmd.bat"
build_script:
- msbuild %solution_name% /p:Configuration=%configuration%;Platform=%platform%;VcpkgTripletConfig=ci -m
after_build:
- if %TOOLCHAIN_VERSION%==12.0 call deploy\prepare_deployment.bat
- if %TOOLCHAIN_VERSION%==12.0 call deploy\deploy_to_bintray.bat
artifacts:
- path: deploy\win-apps\*.7z
name: win-apps
- path: deploy\win-client\*.7z
name: win-client
- path: deploy\win-manager\*.7z
name: win-manager
before_test:
- if %TOOLCHAIN_VERSION%==16.0 curl -fsSL https://github.com/csoltenborn/GoogleTestAdapter/releases/download/v0.18.0/GoogleTestAdapter-0.18.0.vsix -o C:\projects\GoogleTestAdapter.zip
- if %TOOLCHAIN_VERSION%==16.0 call 7z.exe x C:\projects\GoogleTestAdapter.zip -oC:\projects\GoogleTestAdapter -aoa
test_script:
- if %TOOLCHAIN_VERSION%==16.0 call vstest.console.exe win_build\Build\%platform%\%configuration%\unittests.exe /TestAdapterPath:C:\projects\GoogleTestAdapter /logger:Appveyor
# on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
setlocal EnableDelayedExpansion
rem @echo off
if not defined bintray_deploy (
set bintray_deploy=False
)
if !bintray_deploy! == False (
goto :EOF
for /f "tokens=2-4 delims=/ " %%a in ("%date%") do (set MM=%%a& set DD=%%b& set YYYY=%%c)
set build_date=%YYYY%-%MM%-%DD%
set pkg_name=custom
rem GITHUB_SHA might not be available here, better use "git rev-parse --short=8 HEAD" instead
set git_rev=%GITHUB_SHA:~0,8%
set pkg_version=custom_%build_date%_!git_rev!
set pkg_version_desc=Custom build created on %build_date%
if not defined GITHUB_ACTIONS (
set GITHUB_ACTIONS=False
)
set CI_RUN=%GITHUB_ACTIONS%
if "%CI_RUN%" == "True" (
if "%GITHUB_EVENT_NAME%" == "pull_request" (
set pkg_name=pull-requests
set git_rev=%PULL_REQUEST_SHA:~0,8%
set pkg_version=PR%PULL_REQUEST%_%build_date%_!git_rev!
set pkg_version_desc=CI build created from PR #%PULL_REQUEST% on %build_date%
)
if "%GITHUB_EVENT_NAME%" == "schedule" (
set pkg_name=weekly
set git_rev=%GITHUB_SHA:~0,8%
set pkg_version=weekly_%build_date%_!git_rev!
set pkg_version_desc=Weekly CI build created on %build_date%
)
if "%GITHUB_EVENT_NAME%" == "push" (
set pkg_name=master
set git_rev=%GITHUB_SHA:~0,8%
set pkg_version=master_%build_date%_!git_rev!
set pkg_version_desc=Custom build created on %build_date%
)
)
if not defined BINTRAY_API_KEY (
......@@ -35,14 +62,11 @@ if not defined ISSUE_TRACKER_URL (
rem Mandatory for packages in free Bintray repos
if not defined VCS_URL (
set VCS_URL=https://github.com/BOINC/boinc.git
)
)
set CURL=curl -u%BINTRAY_USER%:%BINTRAY_API_KEY% -H Accept:application/json -w \n
rem use this for local debugging
rem set CURL=echo
if not defined pkg_name (
set pkg_name=custom
)
if not defined pkg_desc (
set pkg_desc=Automated CI build of BOINC components
)
......@@ -51,37 +75,23 @@ echo Creating package %pkg_name%...
set data={\"name\": \"!pkg_name!\", \"desc\": \"!pkg_desc!\", \"desc_url\": \"auto\", \"website_url\": [\"%WEBSITE_URL%\"], \"vcs_url\": [\"%VCS_URL%\"], \"issue_tracker_url\": [\"%ISSUE_TRACKER_URL%\"], \"licenses\": [\"LGPL-3.0\"]}
%CURL% -H Content-Type:application/json -X POST -d "%data%" "%API%/packages/%BINTRAY_REPO_OWNER%/%BINTRAY_REPO%"
for /f "tokens=2-4 delims=/ " %%a in ("%date%") do (set MM=%%a& set DD=%%b& set YYYY=%%c)
if not defined build_date (
set build_date=%YYYY%-%MM%-%DD%
)
if not defined git_rev (
set git_rev=%APPVEYOR_REPO_COMMIT:~0,8%
)
if not defined pkg_version (
set pkg_version=custom_%build_date%_!git_rev!
)
if not defined pkg_version_desc (
set pkg_version_desc=Custom build created on %build_date%
)
echo Creating version !pkg_version!...
set data={\"name\": \"!pkg_version!\", \"desc\": \"!pkg_version_desc!\"}
%CURL% -H Content-Type:application/json -X POST -d "%data%" "%API%/packages/%BINTRAY_REPO_OWNER%/%BINTRAY_REPO%/!pkg_name!/versions"
if exist "deploy\win-apps\win-apps_!pkg_version!_%platform%.7z" (
echo Uploading and publishing "deploy\win-apps\win-apps_!pkg_version!_%platform%.7z"
%CURL% -H Content-Type:application/octet-stream -T "deploy\win-apps\win-apps_!pkg_version!_%platform%.7z" "%API%/content/%BINTRAY_REPO_OWNER%/%BINTRAY_REPO%/!pkg_name!/!pkg_version!/win-apps_!pkg_version!_%platform%.7z?publish=1&override=1"
if exist "deploy\win_apps\win_apps.7z" (
echo Uploading and publishing "deploy\win_apps\win_apps.7z"
%CURL% -H Content-Type:application/octet-stream -T "deploy\win_apps\win_apps.7z" "%API%/content/%BINTRAY_REPO_OWNER%/%BINTRAY_REPO%/!pkg_name!/!pkg_version!/win_apps_!pkg_version!.7z?publish=1&override=1"