-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (49 loc) · 1.83 KB
/
database.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
name: Database
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 1 * *'
jobs:
generate_tsv_files:
runs-on: ubuntu-latest
strategy:
matrix:
type: ['database', 'suffix-array']
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
id: cache
with:
shared-key: ${{ env.CACHE_KEY }}
- run: cd scripts/helper_scripts/unipept-database-rs && cargo fetch
if: ${{ !steps.cache.outputs.cache-hit }}
- run: ./scripts/build_binaries.sh
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Install required utilities
run: |
sudo apt-get update
sudo apt-get -y install git curl unzip gawk sqlite3 libsqlite3-dev pv nodejs wget uuid-runtime pigz lz4 parallel
- name: Prepare temporary directories
run: sudo mkdir -p "index" "unipept-temp"
- name: Generate tsv.gz files
shell: bash
run: sudo ./scripts/build_database.sh -i "index" -d "unipept-temp" -m "256M" "${{ matrix.type }}" "swissprot" "https://ftp.expasy.org/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.xml.gz" "output"
- name: Zip all tsv.gz files
shell: bash
run: cd output && zip "${{ matrix.type }}.zip" "*.tsv.lz4"
- name: Upload or Update Release
id: upload_or_update_release
uses: softprops/action-gh-release@v1
with:
files: ${{ matrix.type }}.zip
tag_name: database-${{ env.date }}
name: Database ${{ env.date }}
commitish: ${{ github.sha }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}