Skip to content

Commit

Permalink
Add artifact preparation and update upload step
Browse files Browse the repository at this point in the history
Removed commented-out lines for `MEXLIBCZI_HEADERS` and `MEXLIBCZI_LIBS` in the `cmake` command. Noted potential redundancy with duplicated `cmake --build . --config Release` command.

Added "Prepare artifact" step:
- Uses `bash` shell.
- Creates `artifacts` directory.
- Constructs artifact name using `MEXlibCZI-linux-x64-<git-describe>`.
- Copies `MEXlibCZI.mexa64` to artifact directory.
- Sets `artifactName` and `artifactPath` environment variables.

Updated "Upload artifacts" step to use `actions/upload-artifact@v4` and upload using the set environment variables.
  • Loading branch information
ptahmose committed Oct 3, 2024
1 parent 8c65dd2 commit 17c6c77
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/build_linuxx64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,18 @@ jobs:
cd build
#cmake .. -DCMAKE_BUILD_TYPE=Release -DMEXLIBCZI_HEADERS=$MATLAB_HEADER_PATH -DMEXLIBCZI_LIBS=$MATLAB_LIB_PATH
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
cmake --build . --config Release
- name: Prepare artifact
shell: bash
run: |
mkdir -p artifacts
name="MEXlibCZI-linux-x64-$(git describe --always)"
mkdir -p artifacts/${name}
cp build/MEXlibCZI/MEXlibCZI.mexa64 artifacts/${name}/
echo "artifactName=${name}" >> "$GITHUB_ENV"
echo "artifactPath=artifacts/${name}" >> "$GITHUB_ENV"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: ${{ env.artifactPath }}/
name: ${{ env.artifactName }}

0 comments on commit 17c6c77

Please sign in to comment.