Skip to content

Commit

Permalink
correctly move datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
lobis committed Dec 6, 2023
1 parent 1fce1b7 commit 2281bf9
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ jobs:
path: ${{ github.workspace }}/geant4-data
key: geant4-${{ matrix.geant4-version }}-data
enableCrossOsArchive: true
lookup-only: true

- name: Install Geant4 Datasets
- name: Move Geant4 Datasets
if: steps.cache-geant4-data.outputs.cache-hit != 'true'
run: |
source ${{ github.workspace }}/geant4/bin/geant4.sh
Expand Down Expand Up @@ -180,20 +181,21 @@ jobs:
with:
limit-access-to-actor: false

- name: Save datasets location to env
run: |
GEANT4_DATA_DIR=$(python -c "import geant4_python_application; print(geant4_python_application.datasets.data_dir)")
echo "GEANT4_DATA_DIR=${GEANT4_DATA_DIR}" >> $GITHUB_ENV
- name: Cache Geant4 Datasets
id: cache-geant4-data
uses: actions/cache@v3
with:
path: ${{ github.env.GEANT4_DATA_DIR }}
path: ${{ github.workspace }}/geant4-data
key: geant4-${{ matrix.geant4-version }}-data
fail-on-cache-miss: true
enableCrossOsArchive: true

- name: Move datasets
run: |
mkdir -p ${{ github.workspace }}/geant4-data
GEANT4_DATA_DIR=$(python -c "import geant4_python_application; print(geant4_python_application.datasets.data_dir)")
mv ${{ github.workspace }}/geant4-data $GEANT4_DATA_DIR
- name: Run tests
run: |
source ${{ github.workspace }}/geant4/bin/geant4.sh
Expand Down Expand Up @@ -269,11 +271,17 @@ jobs:
id: cache-geant4-data
uses: actions/cache@v3
with:
path: ${{ github.env.GEANT4_DATA_DIR }}
path: ${{ github.workspace }}/geant4-data
key: geant4-${{ matrix.geant4-version }}-data
fail-on-cache-miss: true
enableCrossOsArchive: true

- name: Move datasets
run: |
mkdir -p ${{ github.workspace }}/geant4-data
GEANT4_DATA_DIR=$(python -c "import geant4_python_application; print(geant4_python_application.datasets.data_dir)")
mv ${{ github.workspace }}/geant4-data $GEANT4_DATA_DIR
- name: Run tests
run: |
find ./tests -name "test_*.py" -exec python -m pytest -vv --reruns 3 --reruns-delay 30 --only-rerun "(?i)http|timeout|connection|socket|resolve" {} \;

0 comments on commit 2281bf9

Please sign in to comment.