Skip to content

Only show First Sync Dialog once #748

Only show First Sync Dialog once

Only show First Sync Dialog once #748

Workflow file for this run

name: Build Audacity Linux Packages
on:
push:
workflow_dispatch:
inputs:
build_level:
description: "Build level to be used. Valid values are: alpha, beta, release"
required: false
default: 'alpha'
type: string
build_type:
description: 'Build type. Valid values are: Debug, Release, RelWithDebInfo, MinSizeRel'
required: false
default: RelWithDebInfo
type: string
configuration_types:
description: 'Build type. Valid values are: Debug, Release, RelWithDebInfo, MinSizeRel or any combination separated with a semicolon'
required: false
default: RelWithDebInfo
type: string
cmake_options:
description: 'Additional CMake options for configuration'
required: false
default: ''
type: string
workflow_call:
inputs:
build_level:
description: "Build level to be used. Valid values are: alpha, beta, release"
required: false
default: 'alpha'
type: string
build_type:
description: 'Build type. Valid values are: Debug, Release, RelWithDebInfo, MinSizeRel'
required: false
default: RelWithDebInfo
type: string
cmake_options:
description: 'Additional CMake options for configuration'
required: false
default: ''
type: string
env:
BUILD_LEVEL: ${{ (inputs && inputs.build_level) || (github.event.inputs && github.event.inputs.build_level) || ((startsWith(github.ref, 'refs/heads/release-') && 'beta') || 'alpha') }}
BUILD_TYPE: ${{ (inputs && inputs.build_type) || (github.event.inputs && github.event.inputs.build_type) || 'Release' }}
CMAKE_OPTIONS: ${{ (inputs && inputs.cmake_options) || (github.event.inputs && github.event.inputs.cmake_options) || '' }}
OWNER: ${{ github.repository_owner }}
jobs:
generate_source_tarball:
name: Source Tarball
runs-on: ubuntu-20.04
steps:
- name: Checkout Audacity
uses: actions/checkout@v2
- name: Setup Dependencies
uses: audacity/audacity-actions/dependencies@v2
- name: Configure
uses: audacity/audacity-actions/configure@v2
with:
generator: Unix Makefiles
build_type: ${{ env.BUILD_TYPE }}
build_level: ${{ env.BUILD_LEVEL }}
cmake_options: ${{ env.CMAKE_OPTIONS }}
- name: Package
shell: bash
run: |
cmake --build .build.x64 --target package_source
- name: Upload sources
uses: actions/upload-artifact@v2
with:
name: audacity-sources
path: |
.build.x64/package/*
!.build.x64/package/_CPack_Packages
if-no-files-found: error
generate_docker_images:
name: Generate Docker Image (${{ matrix.config.name }})
strategy:
fail-fast: false
matrix:
config:
- name: arch-linux
dir: arch
- name: fedora-34
dir: fedora34
#- name: ubuntu-20.04
# dir: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- name: Lowecase owner
shell: bash
run: |
OWNER=${{ github.repository_owner }}
echo "LOWERCASE_OWNER=${OWNER,,}" >> ${GITHUB_ENV}
- name: Checkout Audacity
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ env.LOWERCASE_OWNER }}/audacity-${{ matrix.config.name }}-build
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: linux/packages/${{ matrix.config.dir }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_package:
name: Build Package (${{ matrix.config.name }})
strategy:
fail-fast: false
matrix:
config:
- name: arch-linux
- name: fedora-34
#- name: ubuntu-20.04
needs: [generate_source_tarball, generate_docker_images]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v2
with:
path: .
- shell: bash
name: Perform build
run: |
ls -la .
mv -v audacity-sources/* .
rm -Rfv audacity-sources
deps=$(find -name "audacity-dependencies-*" -type d)
if [ ! -z "${deps}" ]
then
mv -v ${deps}/* .
rm -Rfv ${deps}
fi
chmod -v ga+w .
ls -la .
OWNER=${{ github.repository_owner }}
docker run --volume=$(pwd):/work_dir:rw --rm --network=none ghcr.io/${OWNER,,}/audacity-${{ matrix.config.name }}-build:${{ github.ref_name }}
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.config.name }}-package-${{ github.sha }}
path: |
**/*.rpm
**/*.deb
**/*.zst
if-no-files-found: error