-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (76 loc) · 2.76 KB
/
qa.yaml
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
---
name: QA
on:
push:
branches:
- 'main'
pull_request:
types: ['opened', 'synchronize', 'reopened']
jobs:
qa-ubuntu-conda:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup conda environment
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: test
environment-file: environment-linux.yaml
miniforge-version: latest
mamba-version: '*'
python-version: ${{ matrix.python-version }}
- name: Get Date
id: get-date
run: echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
- name: Cache Conda env
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs
key: ${{ runner.os }}-conda-${{ steps.get-date.outputs.date }}-${{ hashFiles('environment-linux.yaml') }}
id: cache
- name: Update environment
run: |
conda env update --file environment-linux.yaml --name test
if: steps.cache.outputs.cache-hit != 'true'
- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: '1.10'
- name: Cache Julia artifacts
uses: julia-actions/cache@v2
- name: Activate Julia environment
run: |
julia --project=. -e "using Pkg; Pkg.instantiate()"
- name: Set up environment variables
run: |
source env.sh
echo "OIF_IMPL_ROOT_DIR=$OIF_IMPL_ROOT_DIR" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
echo "JULIA_PROJECT=$JULIA_PROJECT" >> $GITHUB_ENV
- name: Show info
run: |
conda info
type gcc
type g++
type python
type pip
type julia
git status
echo "OIF_IMPL_ROOT_DIR = ${OIF_IMPL_ROOT_DIR}"
echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
echo "PYTHONPATH = $PYTHONPATH"
echo "LD_LIBRARY_PATH = $LD_LIBRARY_PATH"
- name: Build
run: |
make
- name: Run tests
run: |
make test