-
Notifications
You must be signed in to change notification settings - Fork 125
113 lines (113 loc) · 3.43 KB
/
emulated.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
#name: arch-emu
#on:
# workflow_dispatch:
# push:
# pull_request:
#
#concurrency: ci-arch-emu-${{ github.ref }}
#
#jobs:
#
# alpine:
# runs-on: ubuntu-latest
#
# defaults:
# run:
# # Use emulated shell as default
# shell: alpine.sh {0}
#
# strategy:
# # Allow other runners in the matrix to continue if some fail
# fail-fast: false
#
# matrix:
# # For available CPU architectures, see:
# # https://github.com/marketplace/actions/setup-alpine-linux-environment
# arch: [x86, aarch64, armv7, ppc64le, riscv64, s390x]
#
# name: alpine (${{ matrix.arch }})
#
# steps:
# - name: checkout repository
# uses: actions/checkout@v4
#
# - name: install dependencies
# uses: jirutka/setup-alpine@v1
# with:
# arch: ${{ matrix.arch }}
# packages: >
# bash
# build-base
# ccache
# cmake
# gfortran
# eigen-dev
# lapack-dev
#
# - name: prepare ccache
# # create key with human readable timestamp
# # used in action/cache/restore and action/cache/save steps
# id: ccache-prepare
# run: |
# echo "key=ccache:alpine:${{ matrix.arch }}:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT
#
# - name: restore ccache
# # setup the GitHub cache used to maintain the ccache from one job to the next
# uses: actions/cache/restore@v4
# with:
# # location of the ccache of the chroot in the root file system
# path: /home/runner/rootfs/alpine-latest-${{ matrix.arch }}/home/runner/.ccache
# key: ${{ steps.ccache-prepare.outputs.key }}
# # Prefer caches from the same branch. Fall back to caches from the default branch.
# restore-keys: |
# ccache:alpine:${{ matrix.arch }}:${{ github.ref }}
# ccache:alpine:${{ matrix.arch }}
#
# - name: configure ccache
# env:
# CCACHE_MAX: ${{ matrix.ccache-max }}
# run: |
# test -d ~/.ccache || mkdir ~/.ccache
# echo "max_size = 20M" >> ~/.ccache/ccache.conf
# echo "compression = true" >> ~/.ccache/ccache.conf
# ccache -s
# which ccache
#
# - name: configure
# run: |
# echo "gcc --version"
# gcc --version
# echo "gcc -dumpmachine"
# gcc -dumpmachine
# echo " "
# mkdir -p ${GITHUB_WORKSPACE}/build && cd ${GITHUB_WORKSPACE}/build
# cmake \
# -DEXAMPLES=ON \
# -DMPI=OFF \
# -DICB=ON \
# -DEIGEN=ON \
# -DCMAKE_C_COMPILER_LAUNCHER="ccache" \
# -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
# ..
#
# - name: build
# run: |
# cd ${GITHUB_WORKSPACE}/build
# cmake --build .
#
# - name: ccache status
# continue-on-error: true
# run: ccache -s
#
# - name: save ccache
# # Save the cache after we are done (successfully) building
# # This helps to retain the ccache even if the subsequent steps are failing.
# uses: actions/cache/save@v4
# with:
# path: /home/runner/rootfs/alpine-latest-${{ matrix.arch }}/home/runner/.ccache
# key: ${{ steps.ccache-prepare.outputs.key }}
#
# - name: test
# run: |
# cd ${GITHUB_WORKSPACE}/build
# ctest . || ctest . --rerun-failed --output-on-failure