diff --git a/.github/workflows/ansible.yml b/.github/workflows/ansible.yml index 7fa9bd7..1faee4b 100644 --- a/.github/workflows/ansible.yml +++ b/.github/workflows/ansible.yml @@ -66,6 +66,9 @@ jobs: - desc: 'Fedora 39' image: 'quay.io/fedora/fedora:39' ansibleopts: '--limit localhost' + - desc: 'Fedora 40' + image: 'quay.io/fedora/fedora:40' + ansibleopts: '--limit localhost' - desc: 'Fedora Rawhide' image: 'quay.io/fedora/fedora:rawhide' ansibleopts: '--limit localhost' diff --git a/.github/workflows/build-mythtv-core.yml b/.github/workflows/build-mythtv-core.yml index 9fee9f9..acf57d0 100644 --- a/.github/workflows/build-mythtv-core.yml +++ b/.github/workflows/build-mythtv-core.yml @@ -19,10 +19,11 @@ name: Build MythTV core variants # on: # yamllint disable-line rule:truthy - workflow_run: - workflows: ["Run ansible-playbook"] - types: - - completed + push: + + pull_request: + + workflow_dispatch: permissions: contents: read @@ -39,7 +40,7 @@ jobs: MYTHTV_CONFIG_EXTRA: CCACHE_DIR: $HOME/.ccache CCACHE_COMPRESS: true - CCACHE_MAXSIZE: 1200M + CCACHE_MAXSIZE: 250M strategy: matrix: @@ -77,6 +78,10 @@ jobs: image: 'quay.io/fedora/fedora:39' ansibleopts: '--limit localhost' configureopts: '' + - desc: 'Fedora 40' + image: 'quay.io/fedora/fedora:40' + ansibleopts: '--limit localhost' + configureopts: '' branch: - desc: 'MythTV master' @@ -158,7 +163,7 @@ jobs: - name: Configure core working-directory: mythtv/mythtv - run: ./configure --prefix=${{ env.MYTHTV_CONFIG_PREFIX }} ${{ env.MYTHTV_CONFIG_EXTRA }} ${{ matrix.container.configureopts }} ${{ matrix.branch.configureopts }} + run: ./configure --compile-type=release --enable-debug=0 --disable-debug --prefix=${{ env.MYTHTV_CONFIG_PREFIX }} ${{ env.MYTHTV_CONFIG_EXTRA }} ${{ matrix.container.configureopts }} ${{ matrix.branch.configureopts }} - name: Make core working-directory: mythtv/mythtv diff --git a/.github/workflows/cleanup-pr-caches.yml b/.github/workflows/cleanup-pr-caches.yml new file mode 100644 index 0000000..f8e33b2 --- /dev/null +++ b/.github/workflows/cleanup-pr-caches.yml @@ -0,0 +1,46 @@ +--- + +# +# Cleanup caches after PR closed +# +# Caches are scoped, and after a PR +# is closed, any caches associated +# with that branch are no longer +# useful. Delete them. +# +# Code copied from: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries +# modified based on: https://github.com/actions/gh-actions-cache/issues/85 +# + +name: Cleanup caches after PR closed + +on: # yamllint disable-line rule:truthy + pull_request: + types: + - closed + +jobs: + cleanup: + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - name: Cleanup + run: | + gh extension install actions/gh-actions-cache + + echo "Fetching list of cache key" + cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) + + ## Setting this to not fail the workflow while deleting cache keys. + set +e + echo "Deleting caches..." + for cacheKey in $cacheKeysForPR + do + gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm + done + echo "Done" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge