Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump actions/download-artifact from 2 to 4.1.7 #19

Merged
merged 3 commits into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading