Skip to content

Commit

Permalink
Use Azure mirror for reference data in testing pipeline (#1988)
Browse files Browse the repository at this point in the history
* Use Azure mirror for reference data in testing pipeline

* Use azure mirror on compare-refdata pipeline

* Add helper script

* Use for loop in bash script

* Minor changes

* Remove files from array
  • Loading branch information
epassaro committed Apr 28, 2022
1 parent 6983bfa commit ae19f26
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/compare-refdata.yml
Expand Up @@ -35,7 +35,7 @@ jobs:
- template: templates/default.yml
parameters:
fetchRefdata: true
refdataRepo: 'github'
refdataRepo: 'azure'
useMamba: false

- bash: |
Expand Down
22 changes: 22 additions & 0 deletions .ci-helpers/download_reference_data.sh
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -e

REF_PATH="$GITHUB_WORKSPACE/tardis-refdata"
REPO_URL="https://dev.azure.com/tardis-sn/TARDIS/_apis/git/repositories/tardis-refdata"

FILES=('atom_data/kurucz_cd23_chianti_H_He.h5'
'atom_data/chianti_He.h5'
'montecarlo_1e5_compare_data.h5'
'packet_unittest.h5'
'sdec_ref.h5'
'unit_test_data.h5')

mkdir -p $REF_PATH/atom_data

for FILE in "${FILES[@]}"
do
wget -q "$REPO_URL/items?path=$FILE&resolveLfs=true" -O $REF_PATH/$FILE
done

exit 0
8 changes: 2 additions & 6 deletions .github/workflows/tests.yml
Expand Up @@ -38,12 +38,8 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Clone tardis-sn/tardis-refdata
uses: actions/checkout@v2
with:
repository: tardis-sn/tardis-refdata
path: tardis-refdata
lfs: true
- name: Download reference data
run: bash .ci-helpers/download_reference_data.sh

- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
Expand Down

0 comments on commit ae19f26

Please sign in to comment.