generated from zbeekman/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (86 loc) · 3.27 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
# Unfortunately, there is a lot of duplicated code that could be simplified/eliminated with YAML anchors and aliases,
# but GitHub Actions does not yet support YAML anchors and aliases.
# Clever use of global environment variables could help eliminate some of it, but the best options would be to just use
# aliases and anchors
name: CI
on:
push:
pull_request:
types: [opened, synchronize]
env:
__TAUCMDR_PROGRESS_BARS__: "disabled"
__TAUCMDR_SYSTEM_PREFIX__: "system"
CI: "ON"
INSTALLDIR: "taucmdr"
PIP_NO_CLEAN: "ON"
PIP_PREFER_BINARY: "ON"
TZ: "UTC"
QEMU_STATIC_VERSION: "v3.1.0-3"
MINIFORGE_VERSION: "4.12.0-2" # needs to be updated in matrix section too--fix this.
MINIFORGE_URL: "https://github.com/conda-forge/miniforge/releases/download"
jobs:
Install-taucmdr-minimal:
name: Install and Test TAU Commander
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
arch: [x86_64, arm64]
python_version: ['3.7']
env:
OS: ${{ matrix.os }}
__TAUCMDR_DB_BACKEND__: ${{ matrix.backend }}
PY_VER: ${{ matrix.python_version }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 9999
- name: System info
id: info
run: |
# Get info for debugging and set some environment variables to use later
uname -a
mount
df -h
echo "github.event_name: ${{ github.event_name }}"
echo "github.ref: ${{ github.ref }}"
echo "matrix.os: ${{ matrix.os }}"
echo "Pythons found:"
type -a python
while read -r line ; do "${line##* is }" --version; done <<< $(type -a python)
export INSTALLDIR="${HOME}/${INSTALLDIR}"
echo "::set-output name=install_dir::${INSTALLDIR}"
echo "INSTALLDIR=${INSTALLDIR}" >> "${GITHUB_ENV}"
echo "::set-output name=home_dir::${HOME}"
echo "::set-output name=taucmdr_system::${INSTALLDIR}/${__TAUCMDR_SYSTEM_PREFIX__}"
echo "__TAUCMDR_SYSTEM_PREFIX__=${INSTALLDIR}/${__TAUCMDR_SYSTEM_PREFIX__}" >> "${GITHUB_ENV}"
echo "::set-output name=branch::${GITHUB_REF#refs/*/}"
echo "BRANCH=${GITHUB_REF#refs/*/}" >> "${GITHUB_ENV}"
echo "BRANCH: ${GITHUB_REF#refs/*/}"
BASEREF=${{ github.base_ref }}
if [ "${BASEREF}" ]; then
echo "::set-output name=baseref::${BASEREF#refs/*/}"
echo "BASEREF: ${BASEREF#/refs/*/}"
else
echo "::set-output name=baseref::unstable"
echo "BASEREF: unstable"
fi
- name: Cache TAU sources
uses: actions/cache@v2
with:
path: ${{ steps.info.outputs.taucmdr_system}}/src
key: ${{ matrix.os }}-system-src-${{ github.sha }}
restore-keys: |
${{ matrix.os }}-system-src
- name: test
run: |
make INSTALLDIR="${INSTALLDIR}" python_check
echo "${INSTALLDIR}/conda/bin" >> $GITHUB_PATH
export PATH="${INSTALLDIR}/conda/bin:${PATH}"
which python
which pip
python -m pip install -U pip
cd "${HOME}"
type -a python
while read -r line ; do "${line##* is }" --version; done <<< $(type -a python)