Skip to content

Commit

Permalink
Merge pull request #19 from Azouaou99/Az
Browse files Browse the repository at this point in the history
Bump actions/download-artifact from 2 to 4.1.7
  • Loading branch information
bakpaul authored Sep 16, 2024
2 parents c8b7b16 + 43a3f49 commit cd41bf1
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,27 +116,40 @@ jobs:
&& cmd //c "${{ steps.sofa.outputs.vs_vsdevcmd }} \
&& cd /d $GITHUB_WORKSPACE/build_release \
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DUSE_BLAS_FOR_OPTIMUS=0 \
-DCMAKE_INSTALL_PREFIX=${{ env.WORKSPACE_INSTALL_PATH }} \
-DCMAKE_PREFIX_PATH="$SOFA_ROOT/build_release/install";$EIGEN_INSTALL_DIR/build_release .. \
&& ninja install"
else
mkdir $GITHUB_WORKSPACE/build_release
cd $GITHUB_WORKSPACE/build_release
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$SOFA_ROOT/build_release/install ..
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ env.WORKSPACE_INSTALL_PATH }} -DCMAKE_PREFIX_PATH=$SOFA_ROOT/build_release/install ..
make -j 8
make install
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 = "Optimus_${{ 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: Optimus_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
path: ${{ github.workspace }}/build_release/install
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: Optimus_${{ steps.sofa.outputs.run_branch }}_for-SOFA-${{ steps.sofa.outputs.sofa_version }}_${{ runner.os }}
path: ${{ github.workspace }}/build_release/install
name: ${{ steps.sanitize.outputs.artifact_name }}
path: ${{ env.WORKSPACE_ARTIFACT_PATH }}

- name: Optimus tests
shell: bash
Expand Down Expand Up @@ -171,7 +184,7 @@ jobs:
continue-on-error: true
steps:
- name: Get artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4.1.7
with:
path: artifacts

Expand Down

0 comments on commit cd41bf1

Please sign in to comment.