-
Notifications
You must be signed in to change notification settings - Fork 3.3k
80 lines (72 loc) · 3.26 KB
/
build-failures.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
name: Update build failure list
on:
schedule:
- cron: 5 5 * * *
push:
branches:
- master
- bulk
paths:
- "**build_failure.*.yaml"
jobs:
update-build-failure-page:
name: Update build failure page
if: ${{ github.repository == 'bioconda/bioconda-recipes' && !contains(github.event.head_commit.message, '[ci skip]') }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set path
run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH
- name: Fetch conda install script
run: |
wget https://raw.githubusercontent.com/bioconda/bioconda-common/master/{common,install-and-set-up-conda,configure-conda}.sh
- name: Restore cache
id: cache
uses: actions/cache@v4
with:
path: /opt/mambaforge
key: ${{ runner.os }}--master--${{ hashFiles('install-and-set-up-conda.sh', 'common.sh', 'configure-conda.sh') }}
- name: Set up bioconda-utils
if: steps.cache.outputs.cache-hit != 'true'
run: bash install-and-set-up-conda.sh
# This script can be used to reconfigure conda to use the right channel setup.
# This has to be done after the cache is restored, because
# the channel setup is not cached as it resides in the home directory.
# We could use a system-wide (and therefore cached) channel setup,
# but mamba does not support that at the time of implementation
# (it ignores settings made with --system).
- name: Configure conda
run: bash configure-conda.sh
- name: Generate build failure table
run: |
set -e
eval "$(conda shell.bash hook)"
conda activate bioconda
branch=${{ github.ref_name }}
mkdir build-failures
if [[ -z $branch || $branch == "master" ]] ; then
md=build-failures/build-failures.md
echo "# Build failures" > $md
echo "Automatically updated (nightly) list of build failures that currently block builds from the listed recipes. Please help with fixing them!" >> $md
bioconda-utils list-build-failures recipes --output-format markdown --link-prefix https://github.com/bioconda/bioconda-recipes/blob/master >> $md
else
if [ -z "$GITHUB_BASE_REF" ] ; then
export GITHUB_BASE_REF="master"
fi
git fetch origin "$GITHUB_BASE_REF"
md="build-failures/build-failures-${branch}.md"
echo "# Build failures on \`${branch}\`" > $md
echo "Automatically updated list of build failures that currently block builds from the listed recipes on the \`${branch}\` branch." >> $md
bioconda-utils list-build-failures recipes --git-range origin/"$GITHUB_BASE_REF" HEAD --output-format markdown --link-prefix https://github.com/bioconda/bioconda-recipes/blob/$branch >> $md
fi
- name: Upload build failure to wiki
uses: docker://decathlon/wiki-page-creator-action:latest
env:
GH_PAT: ${{secrets.BIOCONDA_BOT_REPO_TOKEN}}
ACTION_MAIL: [email protected]
ACTION_NAME: BiocondaBot
OWNER: bioconda
REPO_NAME: bioconda-recipes
MD_FOLDER: build-failures