-
Notifications
You must be signed in to change notification settings - Fork 10
128 lines (126 loc) · 4.5 KB
/
ppc64le_xlf.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
name: ppc64le_xlf
on:
repository_dispatch:
types: [backend_automation]
workflow_dispatch:
jobs:
docker_schedule:
if: (github.event_name == 'workflow_dispatch') || (github.event_name == 'schedule')
strategy:
fail-fast: false
matrix:
include:
- {folder: ppc64le.xlf, archs: linux/ppc64le}
runs-on: ubuntu-latest
timeout-minutes: 420
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup cache
id: setup-cache
uses: actions/cache@v4
with:
path: |
~/cache
key: ${{ matrix.folder}}-nwchemxlf-v000
- name: Qemu
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: crazymax/binfmt:v6.0.0
- name: Available platforms
run: echo ${{ steps.qemu.outputs.platforms }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:master
- name: Login to GitHub Container Registry
if: ${{ github.actor == github.repository_owner }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: fetch cache
if: (steps.setup-cache.outputs.cache-hit == 'true')
run: |
cd ${{ matrix.folder }}
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" ; \
fi
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
if [[ -f ~/cache/mpich.tar.bz2 ]]; then \
echo "mpich cache present" ; \
mkdir -p cache|| true ; \
rsync -av ~/cache/mpich* cache/. ; \
echo "mpich cache fetched" ; \
ls -l cache/ ; \
echo "======" ; \
fi
- name: Get Arch
id: get-arch
run: |
echo "::set-output name=arch::$(echo ${{matrix.archs }} | sed 's/linux//'|sed 's/\///g' )"
shell: bash
- name: docker tag
id: docker-tag
run: |
echo "::set-output name=tag:: ghcr.io/${{ github.actor }}/${{ matrix.folder }}/${{ steps.get-arch.outputs.arch }}"
shell: bash
- name: build date
id: build-date
run: |
echo "::set-output name=date::$(TZ=America/Los_Angeles date +%Y%m%d_%H%M%S)"
- name: cache_hit
id: cache_hit
if: (steps.setup-cache.outputs.cache-hit == 'false')
run: |
echo "cache-hit" is ${{ steps.setup-cache.outputs.cache-hit }}
if [[ ${{ steps.setup-cache.outputs.cache-hit }} == 'false' ]]; then
echo "::set-output name=git::$(echo N)"
else
echo "::set-output name=git::$(echo Y)"
fi
shell: bash
- name: build_schedule
uses: docker/build-push-action@v6
with:
push: ${{ github.actor == github.repository_owner }}
context: ${{ matrix.folder }}
shm-size: 256m
platforms: ${{ matrix.archs }}
tags: |
${{ steps.docker-tag.outputs.tag }}:latest
${{ steps.docker-tag.outputs.tag }}:${{ steps.build-date.outputs.date }}
build-args: |
CACHE_HIT=${{ steps.cache_hit.outputs.hit }}
- name: load and test image
run: |
docker pull ${{ steps.docker-tag.outputs.tag }}
- name: store cache
if: ( github.actor == github.repository_owner )
run: |
mkdir -p ~/cache/
docker run --privileged --user 0 --rm \
--entrypoint='/bin/cp' -v ~/cache:/data \
${{ steps.docker-tag.outputs.tag }} \
-rp /opt/nwchem/src/libext/libext.tar.bz2 /data/. || true
docker run --privileged --user 0 --rm \
--entrypoint='/bin/cp' -v ~/cache:/data \
${{ steps.docker-tag.outputs.tag }} \
-rp /opt/nwchem/src/libext/simint.tar.bz2 /data/. || true
docker run --privileged --user 0 --rm \
--entrypoint='/bin/cp' -v ~/cache:/data \
${{ steps.docker-tag.outputs.tag }} \
-rp /usr/local/mpich.tar.bz2 /data/. || true
ls -Ralrt ~/cache || true