Release 1.10.52 #1126
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: | |
- branch_v1_10 | |
tags: | |
- 'v1_10_*' | |
pull_request: | |
branches: | |
- branch_v1_10 | |
jobs: | |
build-windows: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
configuration: [ Debug, Release ] | |
platform: [ x86, x64 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.0.2 | |
- name: Build | |
run: msbuild frontend/applets/win32/src/Applet.sln -t:Rebuild -p:Configuration=${{ matrix.configuration }} -p:Platform=${{ matrix.platform }} | |
- name: Upload artifacts to GitHub | |
uses: actions/upload-artifact@v2 | |
with: | |
name: applet | |
path: | | |
frontend/applets/win32/src/x64/Release/workrave-applet64.dll | |
frontend/applets/win32/src/Release/workrave-applet.dll | |
frontend/applets/win32/src/x64/Debug/workrave-applet64.dll | |
frontend/applets/win32/src/Debug/workrave-applet.dll | |
build-mingw: | |
runs-on: ubuntu-20.04 | |
needs: [ build-windows ] | |
strategy: | |
matrix: | |
config: | |
- image: mingw-gtk2 | |
configuration: Release | |
compiler: gcc | |
upload: true | |
- image: mingw-gtk2 | |
configuration: Debug | |
compiler: gcc | |
upload: true | |
- image: mingw-gtk | |
configuration: Release | |
compiler: gcc | |
upload: false | |
- image: mingw-gtk | |
configuration: Debug | |
compiler: gcc | |
upload: false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Download applet artifacts from GitHub | |
uses: actions/download-artifact@v2 | |
with: | |
name: applet | |
path: _vsbuild | |
- name: Build | |
run: | | |
if [[ $DOCKER_IMAGE ]]; then | |
IFS=$'\n' | |
docker run --rm \ | |
-v $GITHUB_WORKSPACE:/workspace/source \ | |
`printenv | grep -E '^(CONF_.*|GITHUB_.*|DOCKER_IMAGE|WORKRAVE_.*)=' | sed -e 's/^/-e/g' ` \ | |
ghcr.io/rcaelers/workrave-build:${DOCKER_IMAGE} \ | |
sh -c "/workspace/source/build/ci/build.sh" | |
fi | |
env: | |
WORKRAVE_TAG: ${{ env.GITHUB_TAG }} | |
WORKRAVE_ENV: github-docker | |
WORKRAVE_JOB_INDEX: m${{ strategy.job-index }} | |
CONF_COMPILER: ${{ matrix.config.compiler }} | |
CONF_GTK_VER: ${{ matrix.config.gtk_version }} | |
CONF_ENABLE: ${{ matrix.config.enable }} | |
CONF_DISABLE: ${{ matrix.config.disable }} | |
CONF_DISTCHECK: ${{ matrix.config.distcheck }} | |
CONF_CONFIGURATION: ${{ matrix.config.configuration }} | |
DOCKER_IMAGE: ${{ matrix.config.image }} | |
- name: Upload artifacts to GitHub | |
uses: actions/upload-artifact@v2 | |
if: ${{ matrix.config.upload }} | |
with: | |
name: artifacts | |
path: _deploy | |
build-linux: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
max-parallel: 20 | |
matrix: | |
config: | |
- image: ubuntu-focal | |
compiler: gcc | |
gtk_version: 3 | |
distcheck: yes | |
upload: true | |
enable: gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises | |
- image: ubuntu-focal | |
compiler: gcc | |
gtk_version: 3 | |
enable: gnome3,pulse,dbus,experimental,gstreamer,exercises,xml | |
disable: gsettings,gconf,indicator,xfce,mate,debug,distribution,tests,tracing | |
- image: ubuntu-jammy | |
compiler: gcc | |
gtk_version: 3 | |
enable: gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises | |
- image: ubuntu-lunar | |
compiler: gcc | |
gtk_version: 3 | |
enable: gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises | |
- image: ubuntu-mantic | |
compiler: gcc | |
gtk_version: 3 | |
enable: gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises | |
- image: debian-testing | |
compiler: gcc | |
gtk_version: 3 | |
enable: gnome3,gsettings,xml,pulse,indicator,xfce,mate,dbus,distribution,experimental,gconf,gstreamer,exercises | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Build | |
run: | | |
if [[ $DOCKER_IMAGE ]]; then | |
IFS=$'\n' | |
docker run --rm \ | |
-v $GITHUB_WORKSPACE:/workspace/source \ | |
`printenv | grep -E '^(CONF_.*|GITHUB_.*|DOCKER_IMAGE|WORKRAVE_.*)=' | sed -e 's/^/-e/g' ` \ | |
ghcr.io/rcaelers/workrave-build:${DOCKER_IMAGE} \ | |
sh -c "/workspace/source/build/ci/build.sh" || $FAILURE_ACTION | |
fi | |
env: | |
WORKRAVE_TAG: ${{ env.GITHUB_TAG }} | |
WORKRAVE_ENV: github-docker | |
WORKRAVE_JOB_INDEX: l${{ strategy.job-index }} | |
CONF_COMPILER: ${{ matrix.config.compiler }} | |
CONF_GTK_VER: ${{ matrix.config.gtk_version }} | |
CONF_ENABLE: ${{ matrix.config.enable }} | |
CONF_DISABLE: ${{ matrix.config.disable }} | |
CONF_DISTCHECK: ${{ matrix.config.distcheck }} | |
CONF_CONFIGURATION: ${{ matrix.config.configuration }} | |
DOCKER_IMAGE: ${{ matrix.config.image }} | |
FAILURE_ACTION: ${{ matrix.config.experimental == true }} | |
- name: Upload artifacts to GitHub | |
uses: actions/upload-artifact@v2 | |
if: ${{ matrix.config.upload }} | |
with: | |
name: artifacts | |
path: _deploy | |
deploy: | |
runs-on: ubuntu-20.04 | |
needs: [ build-linux, build-mingw ] | |
if: github.event_name == 'push' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: artifacts | |
path: _deploy | |
- name: Upload artifacts to MinIO | |
run: | | |
aws configure set aws_access_key_id travis | |
aws configure set aws_secret_access_key $SNAPSHOTS_SECRET_ACCESS_KEY | |
aws configure set default.region us-east-1 | |
aws configure set default.s3.signature_version s3v4 | |
aws configure set s3.endpoint_url https://snapshots.workrave.org/ | |
aws s3 --endpoint-url https://snapshots.workrave.org/ cp --recursive _deploy s3://snapshots/v1.10 | |
env: | |
WORKSPACE: ${{ github.workspace }} | |
SNAPSHOTS_SECRET_ACCESS_KEY: ${{ secrets.SNAPSHOTS_SECRET_ACCESS_KEY }} | |
- name: Create artifact catalog | |
run: | | |
cd $GITHUB_WORKSPACE/build/catalog | |
npm i | |
node --experimental-modules main.js | |
env: | |
WORKSPACE: ${{ github.workspace }} | |
SNAPSHOTS_SECRET_ACCESS_KEY: ${{ secrets.SNAPSHOTS_SECRET_ACCESS_KEY }} | |
release: | |
runs-on: ubuntu-20.04 | |
needs: [ build-linux, build-mingw ] | |
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-rc') | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: artifacts | |
path: artifacts | |
- name: Prepare | |
id: prepare | |
run: | | |
TAG=${GITHUB_REF#refs/*/} | |
VERSION=$(echo $TAG | sed -e 's/_/./g' -e 's/-.*//g') | |
echo "TAG=${TAG}" >> $GITHUB_ENV | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
CATALOGS=$( find ${{ github.workspace }}/artifacts/ -name "job-catalog*" ) | |
PORTABLE=$(jq -r '.builds[].artifacts[] | select(.kind == "portable" and .platform == "windows" and .configuration=="release") | .filename' ${CATALOGS}) | |
PORTABLE=$(find ${{ github.workspace }}/artifacts/ -name $PORTABLE) | |
echo ::set-output name=portable_file::${PORTABLE} | |
echo ::set-output name=portable_name::workrave-win32-${VERSION}-portable.zip | |
INSTALLER=$(jq -r '.builds[].artifacts[] | select(.kind == "installer" and .platform == "windows" and .configuration=="release") | .filename' ${CATALOGS}) | |
INSTALLER=$(find ${{ github.workspace }}/artifacts/ -name $INSTALLER) | |
echo ::set-output name=installer_file::${INSTALLER} | |
echo ::set-output name=installer_name::workrave-win32-${VERSION}.exe | |
SOURCE=$(jq -r '.builds[].artifacts[] | select(.kind == "source" and .platform == "all" and .configuration=="none") | .filename' ${CATALOGS}) | |
SOURCE=$(find ${{ github.workspace }}/artifacts/ -name $SOURCE) | |
echo ::set-output name=source_file::${SOURCE} | |
echo ::set-output name=source_name::workrave-${VERSION}.tar.gz | |
- name: Generate news | |
run: | | |
cd ${{ github.workspace }}/build/newsgen | |
npm i | |
cd ${{ github.workspace }} | |
node ${{ github.workspace }}/build/newsgen/main.js \ | |
--input "${{ github.workspace }}/changes.yaml" \ | |
--template github \ | |
--single \ | |
--release $(echo $VERSION | sed -e 's/^v//g') \ | |
--output "github-release-news" | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ env.VERSION }} | |
body_path: ${{ github.workspace }}/github-release-news | |
draft: true | |
prerelease: false | |
- name: Upload portable | |
if: steps.prepare.outputs.portable_file | |
id: upload-portable | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.prepare.outputs.portable_file }} | |
asset_name: ${{ steps.prepare.outputs.portable_name }} | |
asset_content_type: application/zip | |
- name: Upload installer | |
if: steps.prepare.outputs.installer_file | |
id: upload-installer | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.prepare.outputs.installer_file }} | |
asset_name: ${{ steps.prepare.outputs.installer_name }} | |
asset_content_type: application/octet-stream | |
- name: Upload source | |
if: steps.prepare.outputs.source_file | |
id: upload-source | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.prepare.outputs.source_file }} | |
asset_name: ${{ steps.prepare.outputs.source_name }} | |
asset_content_type: application/gzip | |
website: | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' | |
needs: [ deploy ] | |
steps: | |
- name: Trigger workrave.org rebuild | |
run: | | |
curl \ | |
-X POST \ | |
-H "Authorization: token ${{ secrets.TOKEN }}" \ | |
-H 'Accept: application/vnd.github.everest-preview+json' \ | |
-d '{"event_type":"rebuild"}' \ | |
https://api.github.com/repos/rcaelers/workrave-website/dispatches |