Link libjpeg-turbo, libpng and zlib on macOS #261
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: '[AU4] Build: Windows' | |
on: | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: '0 3 */1 */1 *' # At 03:00 on every day-of-month for master | |
# - cron: '0 5 */1 */1 *' # At 05:00 on every day-of-month for current release branch | |
workflow_dispatch: | |
inputs: | |
build_mode: | |
description: 'Build mode: devel_build, nightly_build, testing_build, stable_build' | |
required: true | |
default: 'devel_build' | |
sentry_project: | |
description: 'Upload symbols and dumps to Sentry (choose a project): audacity-4(default for stable build), audacity-4-sandbox' | |
required: false | |
default: '' | |
env: | |
CI_DIR: buildscripts/ci | |
jobs: | |
au4_build_windows: | |
runs-on: windows-2019 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 3 | |
- name: "Configure workflow" | |
shell: bash | |
env: | |
pull_request_title: ${{ github.event.pull_request.title }} | |
SENTRY_SERVER_AU4_KEY: ${{ secrets.SENTRY_SERVER_AU4_KEY }} | |
SENTRY_SERVER_SANDBOX_KEY: ${{ secrets.SENTRY_SERVER_SANDBOX_KEY }} | |
SENTRY_PROJECT: ${{ github.event.inputs.sentry_project }} | |
run: | | |
ADD_INFO="_${GITHUB_REF#refs/heads/}" | |
if [ "${{ github.event_name }}" == "schedule" ] && [ "${{ github.event.schedule }}" == "0 5 */1 */1 *" ]; then ADD_INFO="_${{ env.CURRENT_RELEASE_BRANCH }}"; fi | |
if [ "${{ github.event_name }}" == "pull_request" ]; then ADD_INFO="_${{ github.event.pull_request.number }}_${pull_request_title}"; fi | |
BUILD_MODE=${{ github.event.inputs.build_mode }} | |
cmake -DEVENT=${{ github.event_name }} \ | |
-DBUILD_MODE=${BUILD_MODE} \ | |
-DARTIFACT_INFO="Win_${ADD_INFO}" \ | |
-P ${CI_DIR}/common/ci_configure.cmake | |
DO_BUILD='true' | |
UPLOAD_ARTIFACT_NAME=$(cat ./build.artifacts/env/artifact_name.env) | |
DO_UPLOAD_SYMBOLS='false' | |
SENTRY_URL="" | |
if [ "$SENTRY_SERVER_AU4_KEY" != "" ]; then | |
if [ -z "$SENTRY_PROJECT" ] && [ "$BUILD_MODE" == "stable_build" ]; then | |
SENTRY_PROJECT="audacity-4" | |
fi | |
if [ "$SENTRY_PROJECT" == "audacity-4" ]; then | |
DO_UPLOAD_SYMBOLS='true' | |
SENTRY_URL=https://sentry.audacityteam.org/api/5/minidump/?sentry_key=$SENTRY_SERVER_AU4_KEY | |
fi | |
fi | |
if [ -z "$SENTRY_PROJECT" ] && [ "$BUILD_MODE" == "nightly_build" ]; then | |
SENTRY_PROJECT="audacity-4-sandbox" | |
fi | |
if [ "$SENTRY_PROJECT" == "audacity-4-sandbox" ] && [ "$SENTRY_SERVER_SANDBOX_KEY" != "" ]; then | |
DO_UPLOAD_SYMBOLS='true' | |
SENTRY_URL=https://sentry.audacityteam.org/api/5/minidump/?sentry_key=$SENTRY_SERVER_SANDBOX_KEY | |
fi | |
echo "DO_BUILD=$DO_BUILD" >> $GITHUB_ENV | |
echo "DO_BUILD: $DO_BUILD" | |
echo "UPLOAD_ARTIFACT_NAME=$UPLOAD_ARTIFACT_NAME" >> $GITHUB_ENV | |
echo "UPLOAD_ARTIFACT_NAME: $UPLOAD_ARTIFACT_NAME" | |
echo "DO_UPLOAD_SYMBOLS=$DO_UPLOAD_SYMBOLS" >> $GITHUB_ENV | |
echo "DO_UPLOAD_SYMBOLS: $DO_UPLOAD_SYMBOLS" | |
echo "SENTRY_PROJECT=$SENTRY_PROJECT" >> $GITHUB_ENV | |
echo "SENTRY_PROJECT: $SENTRY_PROJECT" | |
echo "SENTRY_URL=$SENTRY_URL" >> $GITHUB_ENV | |
echo "SENTRY_URL: $SENTRY_URL" | |
- name: Setup environment | |
if: env.DO_BUILD == 'true' | |
shell: bash | |
run: | | |
cmake -P ${CI_DIR}/windows/setup.cmake | |
- name: Build | |
if: env.DO_BUILD == 'true' | |
shell: bash | |
run: | | |
source /c/build_tools/environment.sh | |
cmake -P ${CI_DIR}/windows/ci_build.cmake | |
- name: Package | |
if: env.DO_BUILD == 'true' | |
shell: bash | |
run: | | |
cmake -P ${CI_DIR}/windows/package.cmake | |
- name: Generate and upload dump symbols | |
if: env.DO_UPLOAD_SYMBOLS == 'true' | |
shell: bash | |
run: | | |
APP_BIN=$(pwd)/build.release/src/app/audacity.pdb | |
cmake -DAPP_BIN=${APP_BIN} \ | |
-DSENTRY_URL=https://sentry.audacityteam.org \ | |
-DSENTRY_ORG=sentry \ | |
-DSENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \ | |
-DSENTRY_PROJECT=${SENTRY_PROJECT} \ | |
-P ${CI_DIR}/crashdumps/ci_generate_and_upload.cmake | |
- name: Upload artifacts on GitHub | |
if: env.DO_BUILD == 'true' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.UPLOAD_ARTIFACT_NAME }} | |
path: ./build.artifacts/ | |