Repository navigation
CI: recreate the latest release in the build jobs, so a queued runner can't delete uploads #1261
Workflow file for this run
This file contains hidden or 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: build-linux | |
| on: | |
| push: | |
| paths-ignore: | |
| - '**/README.md' | |
| pull_request: | |
| paths-ignore: | |
| - '**/README.md' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| ccache: ccache | |
| GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| cfg: | |
| - {target: linux} | |
| env: | |
| TARGET: ${{ matrix.cfg.target }} | |
| steps: | |
| # - name: Install libunwind | |
| # run: sudo apt-get install libunwind-dev wget2 | |
| - uses: actions/checkout@v7.0.1 | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2.24 | |
| with: | |
| key: ${{ matrix.cfg.target }} | |
| - name: Recreate the latest release for this commit | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./scripts/ci_latest_release.sh | |
| - name: Determine Release | |
| id: vars | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
| echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV | |
| echo "PRERELEASE=false" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | |
| echo "RELEASE=latest" >> $GITHUB_ENV | |
| echo "PRERELEASE=false" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then | |
| echo "RELEASE=bleeding" >> $GITHUB_ENV | |
| echo "PRERELEASE=true" >> $GITHUB_ENV | |
| else | |
| echo "RELEASE=bleeding" >> $GITHUB_ENV | |
| echo "PRERELEASE=true" >> $GITHUB_ENV | |
| fi | |
| TAG_NAME=${GITHUB_REF#refs/tags/} | |
| echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV | |
| - name: Install | |
| run: ./scripts/linux/ci_install_core.sh | |
| - name: List directory | |
| run: ls -lah ./ | |
| - name: Build | |
| run: ./../openFrameworks/apps/projectGenerator/scripts/linux/build_cmdline.sh | |
| - name: Test cmdline | |
| run: ./../openFrameworks/apps/projectGenerator/scripts/linux/test_cmdline.sh | |
| - name: Build emptyExample and allAddonsExample | |
| if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' | |
| shell: bash | |
| run: ../openFrameworks/apps/projectGenerator/scripts/ci_build_examples.sh linux64 | |
| - name: List output directory | |
| run: ls -lah ./../openFrameworks/apps/projectGenerator/commandLine/bin | |
| - name: Copy commandLine to frontend | |
| run: | | |
| cp ./../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator ./../openFrameworks/apps/projectGenerator/frontend/app/projectGenerator | |
| chmod 755 ./../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator | |
| - name: Build and Package projectGenerator Linux GUI | |
| shell: bash | |
| run: | | |
| cd ../openFrameworks/apps/projectGenerator/frontend | |
| npm install | |
| npm update | |
| npm run dist:linux64 | |
| cd dist | |
| pwd | |
| ls | |
| - name: List output frontend dist dir | |
| run: ls -lah ./../openFrameworks/apps/projectGenerator/frontend/dist | |
| - name: Copy GUI tarball to root directory | |
| run: | | |
| cd ./../openFrameworks/apps/projectGenerator/frontend/dist | |
| mv projectGenerator-*.tar.gz $GITHUB_WORKSPACE/projectGenerator-linux-gui.gz | |
| - name: Test Artefact zip | |
| run: | | |
| cd ./../openFrameworks/apps/projectGenerator/commandLine/bin/ | |
| ls -la | |
| tar -cjf projectGenerator-linux.tar.bz2 projectGenerator | |
| mv projectGenerator-linux.tar.bz2 $GITHUB_WORKSPACE/projectGenerator-linux.tar.bz2 | |
| - name: List output top | |
| run: ls -lah $GITHUB_WORKSPACE | |
| - name: Update Release Linux | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ env.RELEASE }} | |
| make_latest: ${{ env.RELEASE == 'latest' && 'false' || 'legacy' }} | |
| files: projectGenerator-linux.tar.bz2 | |
| - name: Update Release Linux gui | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ env.RELEASE }} | |
| make_latest: ${{ env.RELEASE == 'latest' && 'false' || 'legacy' }} | |
| files: projectGenerator-linux-gui.gz | |
| # Ubuntu 22.04 build - older glibc baseline, covers users/distros that can't | |
| # run binaries linked against 24.04's newer glibc. | |
| build-linux-ubuntu22: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2.24 | |
| with: | |
| key: ubuntu22-linux | |
| - name: Recreate the latest release for this commit | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./scripts/ci_latest_release.sh | |
| - name: Determine Release | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
| echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | |
| echo "RELEASE=latest" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then | |
| echo "RELEASE=bleeding" >> $GITHUB_ENV | |
| else | |
| echo "RELEASE=bleeding" >> $GITHUB_ENV | |
| fi | |
| - name: Install | |
| run: ./scripts/linux/ci_install_core.sh | |
| - name: Build | |
| run: ./../openFrameworks/apps/projectGenerator/scripts/linux/build_cmdline.sh | |
| - name: Test cmdline | |
| run: ./../openFrameworks/apps/projectGenerator/scripts/linux/test_cmdline.sh | |
| - name: Copy commandLine to frontend | |
| run: | | |
| cp ./../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator ./../openFrameworks/apps/projectGenerator/frontend/app/projectGenerator | |
| chmod 755 ./../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator | |
| - name: Build and Package projectGenerator Linux GUI | |
| shell: bash | |
| run: | | |
| cd ../openFrameworks/apps/projectGenerator/frontend | |
| npm install | |
| npm update | |
| npm run dist:linux64 | |
| - name: Copy GUI tarball to root directory | |
| run: | | |
| cd ./../openFrameworks/apps/projectGenerator/frontend/dist | |
| mv projectGenerator-*.tar.gz $GITHUB_WORKSPACE/projectGenerator-linux-ubuntu22-gui.gz | |
| - name: Test Artefact zip | |
| run: | | |
| cd ./../openFrameworks/apps/projectGenerator/commandLine/bin/ | |
| tar -cjf projectGenerator-linux-ubuntu22.tar.bz2 projectGenerator | |
| mv projectGenerator-linux-ubuntu22.tar.bz2 $GITHUB_WORKSPACE/projectGenerator-linux-ubuntu22.tar.bz2 | |
| - name: Update Release Linux ubuntu22 | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ env.RELEASE }} | |
| make_latest: ${{ env.RELEASE == 'latest' && 'false' || 'legacy' }} | |
| files: projectGenerator-linux-ubuntu22.tar.bz2 | |
| - name: Update Release Linux gui ubuntu22 | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ env.RELEASE }} | |
| make_latest: ${{ env.RELEASE == 'latest' && 'false' || 'legacy' }} | |
| files: projectGenerator-linux-ubuntu22-gui.gz | |
| # Native arm64 build for Raspberry Pi (64-bit Raspberry Pi OS / Ubuntu on Pi 3+). | |
| # Runs on a real arm64 runner so the commandLine binary is actually arm64 - | |
| # the previous armv7l/arm64 GUI packages just repackaged the x64 binary built | |
| # above, which can't run on arm hardware at all. | |
| build-linux-arm64: | |
| runs-on: ubuntu-22.04-arm | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2.24 | |
| with: | |
| key: arm64-linux | |
| - name: Recreate the latest release for this commit | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./scripts/ci_latest_release.sh | |
| - name: Determine Release | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
| echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | |
| echo "RELEASE=latest" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then | |
| echo "RELEASE=bleeding" >> $GITHUB_ENV | |
| else | |
| echo "RELEASE=bleeding" >> $GITHUB_ENV | |
| fi | |
| - name: Install | |
| run: ./scripts/linux/ci_install_core.sh | |
| - name: Build | |
| run: ./../openFrameworks/apps/projectGenerator/scripts/linux/build_cmdline.sh | |
| - name: Test cmdline | |
| run: ./../openFrameworks/apps/projectGenerator/scripts/linux/test_cmdline.sh | |
| - name: Copy commandLine to frontend | |
| run: | | |
| cp ./../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator ./../openFrameworks/apps/projectGenerator/frontend/app/projectGenerator | |
| chmod 755 ./../openFrameworks/apps/projectGenerator/commandLine/bin/projectGenerator | |
| - name: Build and Package projectGenerator Linux GUI | |
| shell: bash | |
| run: | | |
| cd ../openFrameworks/apps/projectGenerator/frontend | |
| npm install | |
| npm update | |
| npm run dist:linux:arm64 | |
| - name: Copy GUI tarball to root directory | |
| run: | | |
| cd ./../openFrameworks/apps/projectGenerator/frontend/dist | |
| mv projectGenerator-*-arm64.tar.gz $GITHUB_WORKSPACE/projectGenerator-linux-arm64-gui.gz | |
| - name: Test Artefact zip | |
| run: | | |
| cd ./../openFrameworks/apps/projectGenerator/commandLine/bin/ | |
| tar -cjf projectGenerator-linux-arm64.tar.bz2 projectGenerator | |
| mv projectGenerator-linux-arm64.tar.bz2 $GITHUB_WORKSPACE/projectGenerator-linux-arm64.tar.bz2 | |
| - name: Update Release Linux arm64 | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ env.RELEASE }} | |
| make_latest: ${{ env.RELEASE == 'latest' && 'false' || 'legacy' }} | |
| files: projectGenerator-linux-arm64.tar.bz2 | |
| - name: Update Release Linux gui arm64 | |
| if: github.repository == 'openframeworks/projectGenerator' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ env.RELEASE }} | |
| make_latest: ${{ env.RELEASE == 'latest' && 'false' || 'legacy' }} | |
| files: projectGenerator-linux-arm64-gui.gz |