diff --git a/.github/workflows/build-reusable.yaml b/.github/workflows/build-reusable.yaml index 071520b6b39..2755945d86f 100644 --- a/.github/workflows/build-reusable.yaml +++ b/.github/workflows/build-reusable.yaml @@ -4,8 +4,7 @@ on: workflow_call: inputs: artifact-name: - description: "Named identifier for the artifact" - required: true + description: "Named identifier for the artifact, optional" type: string os: description: "OS list" @@ -23,6 +22,14 @@ on: description: "Compiler list" type: string default: '["gcc","llvm"]' + cmodel: + description: "C model list" + type: string + default: '[""]' + languages: + description: "Languages list" + type: string + default: '[""]' sim: description: "Simulator" type: string @@ -50,12 +57,14 @@ jobs: steps: - name: Report inputs run: | - echo "Artifact name: ${{ inputs.artifact-name }}" - echo "OS list: ${{ inputs.os }}" - echo "Mode list: ${{ inputs.mode }}" - echo "Target list: ${{ inputs.target }}" - echo "Compiler list: ${{ inputs.compiler }}" - echo "Simulator: ${{ inputs.sim }}" + echo "Artifact name: ${{ inputs.artifact-name }}" + echo "OS list: ${{ inputs.os }}" + echo "Mode list: ${{ inputs.mode }}" + echo "Target list: ${{ inputs.target }}" + echo "Compiler list: ${{ inputs.compiler }}" + echo "C model list: ${{ inputs.cmodel }}" + echo "Languages list: ${{ inputs.languages }}" + echo "Simulator: ${{ inputs.sim }}" submodule_cache: name: Initialize submodule cache @@ -100,6 +109,9 @@ jobs: target: ${{ fromJSON(inputs.target) }} compiler: ${{ fromJSON(inputs.compiler) }} sim: ${{ fromJSON(inputs.sim) }} + cmodel: ${{ fromJSON(inputs.cmodel) }} + languages: ${{ fromJSON(inputs.languages) }} + exclude: - mode: musl compiler: llvm @@ -133,6 +145,12 @@ jobs: if [ -n "${{ matrix.sim }}" ]; then ARGS="$ARGS --with-sim=${{ matrix.sim }}" fi + if [ -n "${{ matrix.cmodel }}" ]; then + ARGS="$ARGS --with-cmodel=${{ matrix.cmodel }}" + fi + if [ -n "${{ matrix.languages }}" ]; then + ARGS="$ARGS --enable-languages=${{ matrix.languages }}" + fi $BUILD_TOOLCHAIN $ARGS sudo mkdir /mnt/riscv sudo chown runner:runner /mnt/riscv @@ -166,9 +184,16 @@ jobs: *) MODE="elf";; esac - echo "TOOLCHAIN_NAME=riscv$BITS-$MODE-${{ matrix.os }}-${{ matrix.compiler }}-${{ inputs.artifact-name }}" >> $GITHUB_OUTPUT + ARTIFACT_NAME=${{ inputs.artifact-name }} + if [ -n "$ARTIFACT_NAME" ]; then + ARTIFACT_NAME="-${ARTIFACT_NAME}" + fi + echo "TOOLCHAIN_NAME=riscv$BITS-$MODE-${{ matrix.os }}-${{ matrix.compiler }}${ARTIFACT_NAME}" >> $GITHUB_OUTPUT + - name: Move output to representative name + run: | + mv riscv.tar.xz ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}.tar.xz - uses: actions/upload-artifact@v4 with: name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }} - path: riscv.tar.xz + path: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}.tar.xz diff --git a/.github/workflows/nightly-release.yaml b/.github/workflows/nightly-release.yaml index d72dacb3c83..28e803d670b 100644 --- a/.github/workflows/nightly-release.yaml +++ b/.github/workflows/nightly-release.yaml @@ -55,8 +55,6 @@ jobs: needs: [activity-check] if: needs.activity-check.outputs.stale != 'true' uses: ./.github/workflows/build-reusable.yaml - with: - artifact-name: nightly create-release: needs: [build] @@ -65,7 +63,7 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} datestamp: ${{ env.DATESTAMP }} env: - ARTIFACTS_DIR: /mnt/artifacts/ + ARTIFACTS_DIR: artifacts steps: - name: Run Configuration Commands id: metadata @@ -81,6 +79,7 @@ jobs: uses: actions/download-artifact@v4 with: path: ${{ env.ARTIFACTS_DIR }} + merge-multiple: true - name: List downloaded artifacts run: | echo "Contents of ${{ env.ARTIFACTS_DIR }}"