Continuous Delivery of llvm-firtool #11224
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: Continuous Delivery of llvm-firtool | |
on: | |
workflow_dispatch: | |
# Run every 15 min, checking for new releases is cheap. | |
schedule: | |
- cron: '*/15 * * * *' | |
jobs: | |
detect: | |
name: Detect New Versions | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache FindNewReleases | |
uses: actions/cache@v3 | |
id: docache | |
with: | |
path: FindNewReleases | |
key: ${{ runner.os }}-FindNewReleases-${{ hashFiles('.github/scripts/FindNewReleases.scala') }} | |
# Dont bother caching Scala build, we rarely need to rebuild FindNewReleases | |
- name: Setup Scala | |
uses: VirtusLab/scala-cli-setup@v1 | |
if: steps.docache.outputs.cache-hit != 'true' | |
with: | |
jvm: 'graalvm-community:21.0.2' | |
- name: Compile FindNewReleases | |
if: steps.docache.outputs.cache-hit != 'true' | |
run: | | |
scala-cli --power package --graal --graalvm-java-version 21 --graalvm-version 21.0.2 --force -o FindNewReleases .github/scripts/FindNewReleases.scala | |
- id: detect-versions | |
run: | | |
versions=$(./FindNewReleases) | |
echo "versions=$versions" >> $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
outputs: | |
versions: ${{ steps.detect-versions.outputs.versions }} | |
publish: | |
name: Publish LLVM Firtool | |
needs: detect | |
if: ${{ needs.detect.outputs.versions != '[]' }} | |
strategy: | |
matrix: | |
version: ${{ fromJSON(needs.detect.outputs.versions) }} | |
uses: ./.github/workflows/publish-llvm-firtool.yml | |
with: | |
version: ${{ matrix.version }} | |
snapshot: false | |
secrets: inherit |