-
Notifications
You must be signed in to change notification settings - Fork 1
150 lines (145 loc) · 4.69 KB
/
nwchem_fedpkg_withdocker.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: docker_fedora_packaging
on:
release:
schedule:
- cron: '0 2 * * *'
repository_dispatch:
types: [backend_automation]
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
image:
- fedora:latest
- fedora:35
- fedora:36
- centos:7
- centos:8
- oraclelinux:9
platform:
- linux/amd64
armci_network:
- MPI-TS
experimental: [false]
include:
- image: fedora:latest
platform: linux/ppc64le
armci_network: MPI-TS
experimental: true
- image: fedora:latest
platform: linux/aarch64
armci_network: MPI-TS
experimental: true
- image: centos:7
platform: linux/i386
armci_network: MPI-TS
experimental: true
- image: fedora:latest
platform: linux/amd64
armci_network: MPI-PR
experimental: false
continue-on-error: ${{ matrix.experimental }}
runs-on: ubuntu-latest
steps:
- name: modify image name
run: |
echo "image_name=$(echo ${{ matrix.image}}| sed 's/:/_/')" >> $GITHUB_ENV
echo "platform_name=$(echo ${{ matrix.platform}}| sed 's/\//_/')" >> $GITHUB_ENV
- name: set artifacts dir & name
run: |
echo "art_dir=nwchem-${{ env.image_name }}-${{ matrix.armci_network }}-${{ env.platform_name }}" >> $GITHUB_ENV
echo "art_name=nwchem-${{ env.image_name }}-${{ matrix.armci_network }}-${{ env.platform_name }}.pkg" >> $GITHUB_ENV
- name: delete artifact
uses: geekyeggo/delete-artifact@v2
with:
name: ${{ env.art_name}}
failOnError: false
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 5
ref: builtin
- name: Setup cache
id: setup-cache
uses: actions/cache@v3
with:
path: |
~/cache
key: nwchem-${{ env.image_name }}-${{ env.platform_name }}-v001
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:master
env.BUILDKIT_STEP_LOG_MAX_SIZE=-1
env.BUILDKIT_STEP_LOG_MAX_SPEED=-1
buildkitd-flags: --debug
- name: Qemu
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:qemu-v6.0.0-10
platforms: ${{ matrix.platform }}
- name: fetch cache
if: (steps.setup-cache.outputs.cache-hit == 'true')
run: |
cd nwchem
ls -lrta
if [[ -f ~/cache/libext.tar.bz2 ]]; then \
echo "libext cache present" ; \
mkdir -p cache|| true ; \
rsync -av ~/cache/libext* cache/. ; \
echo "libext cache fetched" ; \
if [[ -f ~/cache/simint.tar.bz2 ]]; then \
echo "simint cache present" ; \
mkdir -p cache|| true ; \
rsync -av ~/cache/simint* cache/. ; \
echo "simint cache fetched" ; \
fi
ls -l cache/ ; \
echo "======" ; \
fi
echo "cache_hit=Y" >> $GITHUB_ENV
- name: negative-cache-hit-reporter
if: (steps.setup-cache.outputs.cache-hit != 'true')
run: |
echo "cache_hit=N" >> $GITHUB_ENV
- name: build_docker
uses: docker/build-push-action@v3
with:
push: false
context: nwchem
shm-size: 256m
platforms: ${{ matrix.platform }}
outputs: type=local,dest=out
build-args: |
IMAGE=${{ matrix.image }}
CACHE_HIT=${{ env.cache_hit }}
ARMCI_NETWORK=${{ matrix.armci_network }}
- name: store cache
if: ( github.actor == github.repository_owner )
run: |
mkdir -p ~/cache/
ls -lrta out || true
cp out/libext.tar.bz2 ~/cache || true
ls -Ralrt ~/cache || true
- name: copy packages
run: |
find . -name "*rpm" || true
mkdir -p ${{ env.art_dir }}
cp out/nwchem*rpm ${{ env.art_dir }}/.
- name: rename packages
run: |
cd ${{ env.art_dir }}
if [[ ${{ matrix.armci_network }} == "MPI-PR" ]]; then \
for f in *rpm; do mv $f $(echo $f|sed s/.rpm/.mpipr.rpm/) ; done
fi
for f in *rpm; do mv $f $(echo $f|sed s/.rpm/.${{env.image_name}}.rpm/) ; done
ls -lrat
- name: upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.art_name }}
path: ${{ env.art_dir }}
retention-days: 7