-
Notifications
You must be signed in to change notification settings - Fork 3
118 lines (103 loc) · 4.11 KB
/
main.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
name: benchmark
on:
- push
concurrency:
# Cancel concurrent flows
group: ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
evaluate:
runs-on: ubuntu-latest
permissions:
actions: write
env:
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
ZENODO_TOKEN: ${{ secrets.ZENODO_TOKEN }}
BENCHMARK_GIAB_NA12878_AGILENT_TOKEN: ${{ secrets.BENCHMARK_GIAB_NA12878_AGILENT_TOKEN }}
BO_AGILENT_TOKEN: ${{ secrets.BO_AGILENT_TOKEN }}
CO_AGILENT_TOKEN: ${{ secrets.CO_AGILENT_TOKEN }}
BO_CORE_UNIT_TOKEN: ${{ secrets.BO_CORE_UNIT_TOKEN }}
BENCHMARK_GIAB_NA12878_TWIST_TOKEN: ${{ secrets.BENCHMARK_GIAB_NA12878_TWIST_TOKEN }}
SNAKEMAKE_STORAGE_ZENODO_ACCESS_TOKEN: ${{ secrets.SNAKEMAKE_STORAGE_ZENODO_ACCESS_TOKEN }}
steps:
- uses: 8BitJonny/[email protected]
id: pr
with:
sha: ${{ github.event.pull_request.head.sha }}
filterOutClosed: true
- run: |
echo "is PR: ${{ steps.pr.outputs.pr_found }}"
echo "current branch: ${{ github.ref }}"
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
docker-images: false
- name: Check out repository code
uses: actions/checkout@v2
- name: Download reference genome
uses: snakemake/snakemake-github-action@v1
with:
directory: "."
snakefile: "workflow/Snakefile"
args: "--cores 1 --use-conda --conda-cleanup-pkgs cache resources/reference/genome.fasta"
stagein: |
pip install snakemake-storage-plugin-zenodo snakemake-storage-plugin-http
- name: Download truthsets
uses: snakemake/snakemake-github-action@v1
with:
directory: "."
snakefile: "workflow/Snakefile"
args: "--use-conda --cores 1 --conda-cleanup-pkgs cache --until benchmark_get_truth"
stagein: |
pip install snakemake-storage-plugin-zenodo snakemake-storage-plugin-http
# This step is necessary (after downloading the truthsets above) to ensure
# that the files coming from the git repo are not triggering reruns
# because their modification dates are too new or too old.
# (as git does not preserve modification dates)
- name: Fix modification dates
uses: snakemake/snakemake-github-action@v1
with:
directory: "."
snakefile: "workflow/Snakefile"
args: "--cores 1 --touch resources/regions/*/test-regions.cov-*.bed"
stagein: |
pip install snakemake-storage-plugin-zenodo snakemake-storage-plugin-http
- name: Run analysis
uses: snakemake/snakemake-github-action@v1
with:
directory: "."
snakefile: "workflow/Snakefile"
args: >
--cores 2 --use-conda --conda-cleanup-pkgs cache
stagein: |
pip install snakemake-storage-plugin-zenodo snakemake-storage-plugin-http
- name: Create report
uses: snakemake/snakemake-github-action@v1
with:
directory: "."
snakefile: "workflow/Snakefile"
args: "--report report.zip"
stagein: |
pip install snakemake-storage-plugin-zenodo snakemake-storage-plugin-http
- name: Upload report as artifact
uses: actions/upload-artifact@v3
with:
name: report
path: report.zip
- name: Trigger homepage build
if: ${{ (steps.pr.outputs.pr_found != 'true') && (github.ref == 'refs/heads/main') }}
uses: benc-uk/workflow-dispatch@v1
with:
workflow: deploy-page
repo: ncbench/ncbench.github.io
token: ${{ secrets.WORKFLOW_DISPATCH_TOKEN }}