-
Notifications
You must be signed in to change notification settings - Fork 12
127 lines (114 loc) · 4.83 KB
/
scheduled_bridge_cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
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@v3
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.1-jar-with-dependencies.jar
key: cached-meta-data-action-${{ hashFiles('meta-data-action-1.1.1-jar-with-dependencies.jar') }}
restore-keys: |
cached-meta-data-action-${{ hashFiles('meta-data-action-1.1.1-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.1-jar-with-dependencies.jar ]; then
wget -O meta-data-action-1.1.1-jar-with-dependencies.jar https://github.com/wikipathways/meta-data-action/releases/download/v1.1.1/meta-data-action-1.1.1-jar-with-dependencies.jar
fi
- name: Cache and install dependencies
uses: actions/cache@v3
id: cache
with:
path: ${{ github.workspace }}/wikipathways-database/Hs_Derby_Ensembl_108.bridge
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 }}/wikipathways-database"
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