From b72eafbfd0f4db6ed69024602fbd700117d0a34e Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Thu, 12 Sep 2024 17:17:27 +0200 Subject: [PATCH 1/2] Update ci.yml --- .github/workflows/ci.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86da1f1..7fcf165 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,16 +92,28 @@ jobs: echo ${CCACHE_BASEDIR} ccache -s fi + - name: Sanitize artifact name + id: sanitize + # This step removes special characters from the artifact name to ensure compatibility with upload-artifact + # Characters removed: " : < > | * ? \r \n \ / + # Spaces are replaced with underscores + # This sanitization prevents errors in artifact creation and retrieval + shell: pwsh + run: | + $originalName = "CGALPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}" + $artifact_name = $originalName -replace '[":;<>|*?\r\n\\/]', '' -replace ' ', '_' + echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT + - name: Create artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.4.0 with: - name: CGALPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }} + name: ${{ steps.sanitize.outputs.artifact_name }} path: ${{ env.WORKSPACE_INSTALL_PATH }} - name: Install artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4.1.7 with: - name: CGALPlugin_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }} + name: ${{ steps.sanitize.outputs.artifact_name }} path: ${{ env.WORKSPACE_ARTIFACT_PATH }} deploy: From 5d34b1105a9b14161673535e7f65d51e5f053786 Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Thu, 12 Sep 2024 17:23:57 +0200 Subject: [PATCH 2/2] Update ci.yml --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7fcf165..be30496 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ name: CI on: workflow_dispatch: push: + pull_request: jobs: build-and-test: