diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 055232b..fd02ee7 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -59,11 +59,13 @@ jobs: EXAMPLE="examples/${{ matrix.example }}" EXAMPLE_DIR=$(dirname "${EXAMPLE}") EXAMPLE_FILE=$(basename "${EXAMPLE}") + FIGURE_DIR=$(realpath figs/) echo "ARTIFACT_NAME=${EXAMPLE_FILE}" >> $GITHUB_ENV + echo "FIGURE_DIR=${FIGURE_DIR}" >> $GITHUB_ENV - mkdir -p figs - python rhodium/test/plot_to_savefig.py "${EXAMPLE}" "$(realpath figs/)" + mkdir -p "${FIGURE_DIR}" + python rhodium/test/plot_to_savefig.py "${EXAMPLE}" "${FIGURE_DIR}" pushd "${EXAMPLE_DIR}" @@ -75,9 +77,13 @@ jobs: export LD_LIBRARY_PATH="$(pwd):${LD_LIBRARY_PATH}" python "${EXAMPLE_FILE}" + if [ -d "images/" ]; then + mv images/ "${FIGURE_DIR}" + fi + - name: Upload figures uses: actions/upload-artifact@v4 with: name: "${{ env.ARTIFACT_NAME }}" - path: figs/ + path: "${{ env.FIGURE_DIR }}" if-no-files-found: ignore