From 1dc9c8db4edb49f7a2ec48a78ebb3d52e59c6795 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Wed, 6 Dec 2023 14:19:21 -0800 Subject: [PATCH] Add workflow for publishing llvm-firtool --- .github/workflows/publish-debug.yml | 12 +++++ .github/workflows/publish-llvm-firtool.yml | 55 ++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 .github/workflows/publish-debug.yml create mode 100644 .github/workflows/publish-llvm-firtool.yml diff --git a/.github/workflows/publish-debug.yml b/.github/workflows/publish-debug.yml new file mode 100644 index 0000000..8a64938 --- /dev/null +++ b/.github/workflows/publish-debug.yml @@ -0,0 +1,12 @@ +# TODO this file +name: Publish LLVM Firtool Debug + +on: + pull_request: + +jobs: + publish: + uses: ./.github/workflows/publish-llvm-firtool.yml + with: + version: '1.58.0' + snapshot: 'true' diff --git a/.github/workflows/publish-llvm-firtool.yml b/.github/workflows/publish-llvm-firtool.yml new file mode 100644 index 0000000..0adac94 --- /dev/null +++ b/.github/workflows/publish-llvm-firtool.yml @@ -0,0 +1,55 @@ +name: Publish LLVM Firtool + +on: + # TODO switch to workflow_dispatch + workflow_call: + inputs: + version: + description: 'The version of firtool and llvm-firtool to publish' + required: true + type: string + snapshot: + description: 'Should the version of llvm-resolver be a SNAPSHOT' + default: 'true' + required: true + type: string + +jobs: + test: + - name: Run Tests + uses: ./.github/workflows/test.yml + with: + version: ${{ inputs.version }} + snapshot: ${{ inputs.snapshot }} + + publish: + name: Publish LLVM Firtool + runs-on: ubuntu-20.04 + needs: test + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Scala and Coursier + uses: coursier/setup-action@v1 + with: + jvm: adopt:11 + + - name: Check if already published + # TODO skip if snapshot + run: | + if cs fetch org.chipsalliance:llvm-firtool:${{ inputs.version }} ; then + echo "llvm-firtool version ${{ inputs.version }} has already been published!" >> $GITHUB_STEP_SUMMARY + exit 1 + else + exit 0 + fi + + + - name: Publish + shell: bash + run: | + ./mill resolve _ + # TODO do publish +