Porytiles Nightly Release #421
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: Porytiles Nightly Release | |
on: | |
# schedule: | |
# - cron: "00 05 * * *" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Block nightly release pipeline if release was already built from this commit | |
check-already-built: | |
name: Check if we already built a nightly from this commit SHA | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: octokit/[email protected] | |
id: check_last_run | |
with: | |
route: GET /repos/${{github.repository}}/actions/workflows/nightly_release.yml/runs?per_page=1&status=completed | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: "echo Last nightly build: ${{fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha}}" | |
outputs: | |
last_sha: ${{fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha}} | |
nightly-release-linux-amd64: | |
name: Release a linux-amd64 binary based on the develop branch | |
runs-on: ubuntu-latest | |
needs: [ check-already-built ] | |
if: needs.check-already-built.outputs.last_sha != github.sha | |
steps: | |
- name: Checkout the develop branch | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
- name: Install Porytiles build dependencies | |
uses: ./.github/workflows/install_dependencies_linux | |
- name: Install clang | |
uses: ./.github/workflows/install_clang_linux | |
- name: Build Porytiles | |
uses: ./.github/workflows/build_linux_clang | |
with: | |
build-version: nightly-${{ github.sha }} | |
- name: Run the test suite | |
uses: ./.github/workflows/run_test_suite | |
- name: Create release package | |
uses: ./.github/workflows/create_release_package | |
with: | |
os-arch: linux-amd64 | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: nightly-${{github.sha}} | |
files: porytiles-linux-amd64.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
nightly-release-linux-arm64: | |
name: Release a linux-arm64 binary based on the develop branch | |
runs-on: ubuntu-24.04-arm | |
needs: [ check-already-built ] | |
if: needs.check-already-built.outputs.last_sha != github.sha | |
steps: | |
- name: Checkout the develop branch | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
- name: Install Porytiles build dependencies | |
uses: ./.github/workflows/install_dependencies_linux | |
- name: Install clang | |
uses: ./.github/workflows/install_clang_linux | |
- name: Build Porytiles | |
uses: ./.github/workflows/build_linux_clang | |
with: | |
build-version: nightly-${{ github.sha }} | |
- name: Run the test suite | |
uses: ./.github/workflows/run_test_suite | |
- name: Create release package | |
uses: ./.github/workflows/create_release_package | |
with: | |
os-arch: linux-arm64 | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: nightly-${{github.sha}} | |
files: porytiles-linux-arm64.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
nightly-release-macos-amd64: | |
name: Release a macos-amd64 binary based on the develop branch | |
runs-on: macos-13 | |
needs: [ check-already-built ] | |
if: needs.check-already-built.outputs.last_sha != github.sha | |
steps: | |
- name: Checkout the develop branch | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
- name: Install Porytiles build dependencies | |
uses: ./.github/workflows/install_dependencies_macos | |
- name: Build Porytiles | |
uses: ./.github/workflows/build_macos_clang | |
with: | |
build-version: nightly-${{ github.sha }} | |
- name: Run the test suite | |
uses: ./.github/workflows/run_test_suite | |
- name: Create release package | |
uses: ./.github/workflows/create_release_package | |
with: | |
os-arch: macos-amd64 | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: nightly-${{github.sha}} | |
files: porytiles-macos-amd64.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
nightly-release-macos-arm64: | |
name: Release a macos-arm64 binary based on the develop branch | |
runs-on: macos-latest | |
needs: [ check-already-built ] | |
if: needs.check-already-built.outputs.last_sha != github.sha | |
steps: | |
- name: Checkout the develop branch | |
uses: actions/checkout@v4 | |
with: | |
ref: develop | |
- name: Install Porytiles build dependencies | |
uses: ./.github/workflows/install_dependencies_macos | |
- name: Build Porytiles | |
uses: ./.github/workflows/build_macos_clang | |
with: | |
build-version: nightly-${{ github.sha }} | |
- name: Run the test suite | |
uses: ./.github/workflows/run_test_suite | |
- name: Create release package | |
uses: ./.github/workflows/create_release_package | |
with: | |
os-arch: macos-arm64 | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: nightly-${{github.sha}} | |
files: porytiles-macos-arm64.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |