Skip to content

Weekly caching of bridge and meta-data-action #22

Weekly caching of bridge and meta-data-action

Weekly caching of bridge and meta-data-action #22

name: Weekly caching of bridge and meta-data-action
on:
repository_dispatch: # triggered by https://github.com/bridgedb/data/blob/main/.github/workflows/geneUpdates.yml
types: [bridgedb-data-update-event]
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: false # to allow multiple runs to queue up rather than clobber
jobs:
refresh-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout wikipathways-database repo
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Cache meta-data-action with dependencies
uses: actions/cache@v3
id: cacheMetaJar
with:
path: ./meta-data-action-1.1.2-jar-with-dependencies.jar
key: cached-meta-data-action-${{ hashFiles('meta-data-action-1.1.2-jar-with-dependencies.jar') }}
restore-keys: |
cached-meta-data-action-${{ hashFiles('meta-data-action-1.1.2-jar-with-dependencies.jar') }}
cached-meta-data-action-
- name: Install deps
run: |
echo "Refreshing cached-meta-data-action"
if [ ! -e ./meta-data-action-1.1.2-jar-with-dependencies.jar ]; then
wget -O meta-data-action-1.1.2-jar-with-dependencies.jar https://github.com/wikipathways/meta-data-action/releases/download/v1.1.2/meta-data-action-1.1.2-jar-with-dependencies.jar
fi
- name: Cache and install dependencies
uses: actions/cache@v3
id: cache
with:
path: ${{ github.workspace }}/Hs_Derby_Ensembl_108.bridge #SANDBOX
key: ${{ runner.os }}-java-Hs_Derby_Ensembl_108
restore-keys: |
${{ runner.os }}-java-Hs_Derby_Ensembl_108
${{ runner.os }}-java-Hs_Derby_Ensembl_
- if: steps.cache.outputs.cache-hit != 'true'
name: Install deps
run: |
cd "${{ github.workspace }}" #SANDBOX
if [ ! -e ./Hs_Derby_Ensembl_108.bridge ]; then
wget -O Hs_Derby_Ensembl_108.bridge https://zenodo.org/record/7781913/files/Hs_Derby_Ensembl_108.bridge?download=1
fi
- name: Generate gdb.config, fileNames.config, and fileDownloads.config
run: |
for f in ${{needs.changed-gpmls.outputs.added-modified}}; do
scripts/meta-data-action/configGenerator.sh $f
done
- name: Cache all bridge files
uses: actions/cache@v3
id: cacheAllBridge
with:
path: |
./metabolites*.bridge
./Ag*.bridge
./An*.bridge
./At*.bridge
./Bs*.bridge
./Bt*.bridge
./Ce*.bridge
./Cf*.bridge
./Ci*.bridge
./Dr*.bridge
./Da*.bridge
./Dp*.bridge
./Dm*.bridge
./Ec*.bridge
./Gg*.bridge
./Fg*.bridge
./Gm*.bridge
./Hs*.bridge
./Hv*.bridge
./Ml*.bridge
./Mm*.bridge
./Mx*.bridge
./Oa*.bridge
./Ova*.bridge
./Oi*.bridge
./Oj*.bridge
./Pi*.bridge
./Pt*.bridge
./Qc*.bridge
./Rn*.bridge
./Sc*.bridge
./Sl*.bridge
./Ss*.bridge
./Vv*.bridge
./Xt*.bridge
./Zm*.bridge
key: cached-bridge-files
restore-keys: |
cached-bridge-files
- name: Install all bridge files
run: |
echo "Cache not found: cached-bridge-files"
declare -a OrganismNames=("Metabolites" "Anopheles gambiae" "Aspergillus niger" "Arabidopsis thaliana" "Bacillus subtilis" "Bos taurus" "Caenorhabditis elegans" "Canis familiaris" "Ciona intestinalis" "Danio rerio" "Daphnia magna" "Daphnia pulex" "Drosophila melanogaster" "Escherichia coli" "Gallus gallus" "Fusarium graminearum" "Glycine max" "Homo sapiens" "Hordeum vulgare" "Macaca mulatta" "Mus musculus" "Mycobacterium tuberculosis" "Ornithorhynchus anatinus" "Ovis aries" "Oryza indica" "Oryza japonica" "Populus trichocarpa" "Pan troglodytes" "Equus caballus" "Rattus norvegicus" "Saccharomyces cerevisiae" "Solanum lycopersicum" "Sus scrofa" "Vitis vinifera" "Xenopus tropicalis" "Zea mays")
for org in "${OrganismNames[@]}"; do
echo "generating configuration files for "$org""
scripts/meta-data-action/configGenerator.sh "$org"
echo "installing bridgedb files for "$org""
scripts/meta-data-action/installDependencies.sh "$org"
done