name: CMake Build on: push: pull_request: defaults: run: shell: bash jobs: build: name: ${{ matrix.config.name }} runs-on: ${{ matrix.config.os }} env: AUDACITY_CMAKE_GENERATOR: ${{ matrix.config.generator }} AUDACITY_ARCH_LABEL: ${{ matrix.config.arch }} # Windows codesigning # This variables will be used by all the steps WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} # Conan home location to be used for cache action CONAN_USER_HOME: "${{ github.workspace }}/conan-home/" CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan-home/short" strategy: fail-fast: false matrix: config: - name: Ubuntu_18.04 os: ubuntu-18.04 arch: x86_64 # as reported by `arch` or `uname -m` generator: Unix Makefiles - name: macOS_Intel os: macos-latest arch: Intel # as reported by Apple menu > About This Mac generator: Xcode - name: Windows_32bit os: windows-latest arch: 32bit # as reported by Windows Settings > System > About generator: Visual Studio 16 2019 - name: Windows_64bit os: windows-latest arch: 64bit # as reported by Windows Settings > System > About generator: Visual Studio 16 2019 steps: - name: Checkout uses: actions/checkout@v2 - name: Dependencies run: | exec bash "scripts/ci/dependencies.sh" - name: Environment run: | source "scripts/ci/environment.sh" - name: Install Apple codesigning certificates uses: apple-actions/import-codesign-certs@v1 if: startswith( matrix.config.os, 'macos' ) && github.event_name == 'push' && github.repository_owner == 'audacity' with: p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }} p12-password: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - name: Cache for .conan id: cache-conan uses: actions/cache@v2 env: cache-name: cache-conan-modules with: path: ${{ env.CONAN_USER_HOME }} key: host-${{ matrix.config.name }}-${{ hashFiles('cmake-proxies/CMakeLists.txt') }} restore-keys: | host-${{ matrix.config.name }}- - name: Configure env: # Apple code signing APPLE_CODESIGN_IDENTITY: ${{ secrets.APPLE_CODESIGN_IDENTITY }} APPLE_NOTARIZATION_USER_NAME: ${{ secrets.APPLE_NOTARIZATION_USER_NAME }} APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }} run: | exec bash "scripts/ci/configure.sh" - name: Build run: | exec bash "scripts/ci/build.sh" - name: Install run: | exec bash "scripts/ci/install.sh" - name: Package run: | exec bash "scripts/ci/package.sh" - name: Upload artifact uses: actions/upload-artifact@v2 with: name: Audacity_${{ matrix.config.name }}_${{ github.run_id }}_${{ env.GIT_HASH_SHORT }} path: | build/package/* !build/package/_CPack_Packages if-no-files-found: error