-
Notifications
You must be signed in to change notification settings - Fork 126
94 lines (87 loc) · 3.44 KB
/
ci.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
name: CI/CD
on:
push:
pull_request:
jobs:
images:
runs-on: ubuntu-latest
env:
RELEASE_TYPE: ${{ matrix.release_type }}
RELEASE_VERSION: ${{ matrix.release_version }}
DOCKER_BASE_REPO: gitlab-registry.cern.ch/atlas/athena
DOCKER_TARGET_REPO: ucatlas
RELEASE: ${{ format('{0}@{1}', matrix.release_type, matrix.release_version) }}
strategy:
matrix:
release_type:
- analysisbase
release_version:
- 24.2.37
- 24.2.38
- 24.2.39
- 24.2.40
- 24.2.41
- 25.2.0
- 25.2.1
- 25.2.2
- 25.2.3
- 25.2.4
steps:
- uses: actions/checkout@master
- name: build ${{ env['RELEASE'] }}
run: |
docker build --build-arg GIT_SHA=$GITHUB_SHA \
--build-arg DOCKER_BASE_REPO \
--build-arg DOCKER_IMG=$RELEASE_TYPE \
--build-arg DOCKER_TAG=$RELEASE_VERSION \
-t ${DOCKER_TARGET_REPO}/${RELEASE_TYPE}:${RELEASE_VERSION}-latest .
- name: "test bash on ${{ env['DOCKER_TARGET_REPO'] }}/${{ env['RELEASE_TYPE'] }}:${{ env['RELEASE_VERSION'] }}"
run: |
docker run --rm ${DOCKER_TARGET_REPO}/${RELEASE_TYPE}:${RELEASE_VERSION}-latest /bin/bash -c "source ~/.bashrc"
- name: "test xAH_run.py on ${{ env['DOCKER_TARGET_REPO'] }}/${{ env['RELEASE_TYPE'] }}:${{ env['RELEASE_VERSION'] }}"
run: |
docker run --rm ${DOCKER_TARGET_REPO}/${RELEASE_TYPE}:${RELEASE_VERSION}-latest /bin/bash -c 'source /xAODAnaHelpers_setup.sh; xAH_run.py -h'
- name: timestamp the image
run: |
docker tag ${DOCKER_TARGET_REPO}/${RELEASE_TYPE}:${RELEASE_VERSION}-latest ${DOCKER_TARGET_REPO}/${RELEASE_TYPE}:${RELEASE_VERSION}-${GITHUB_SHA::6}-$(date +%Y%m%d)
- name: deploy latest and timestamped for ${{ env['RELEASE'] }}
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker push ${DOCKER_TARGET_REPO}/${RELEASE_TYPE}:${RELEASE_VERSION}-${GITHUB_SHA::6}-$(date +%Y%m%d)
docker push ${DOCKER_TARGET_REPO}/${RELEASE_TYPE}:${RELEASE_VERSION}-latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
docs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install linux dependencies
run: |
sudo apt-get update
sudo apt-get -yqq --no-install-suggests --no-install-recommends install doxygen doxygen-doc doxygen-gui doxygen-latex graphviz
- name: Install python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --ignore-installed -U -q -r docs/requirements.txt
pip list
- name: Build docs
run: |
cd docs && make html && cd ../
touch docs/_build/html/.nojekyll
- name: Deploy docs to GitHub Pages
if: success() && github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: crazy-max/ghaction-github-pages@v1.0.1
with:
target_branch: gh-pages
build_dir: docs/_build/html
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}