Skip to content

Commit

Permalink
Move images/ to figure output
Browse files Browse the repository at this point in the history
  • Loading branch information
dhadka committed Sep 5, 2024
1 parent 8784fe0 commit b0ab38d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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

0 comments on commit b0ab38d

Please sign in to comment.