-
Notifications
You must be signed in to change notification settings - Fork 19
57 lines (54 loc) · 1.72 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
name: CI
on:
push:
branches: [ main ]
paths-ignore:
- '*.md'
- 'docs/**'
pull_request:
branches: [ main ]
paths-ignore:
- '*.md'
- 'docs/**'
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
build-config: ["", "-g"]
runs-on: ubuntu-latest
container:
image: acceracontainers.azurecr.io/accera-llvm-ubuntu:llvmorg-14.0.6-1
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
# running within a container, install miniconda manually
- name: Init python ${{ matrix.python-version }}
run: |
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $HOME/miniconda.sh
bash $HOME/miniconda.sh -b -p $HOME/miniconda
$HOME/miniconda/bin/conda init bash
$HOME/miniconda/bin/conda create -y -n build python=${{ matrix.python-version }}
eval "$($HOME/miniconda/bin/conda shell.bash hook)"
conda init
conda activate build
python -m pip install -U pip
python -m pip install -r requirements.txt
# miniconda needs to be activated each time
- name: Build ${{ matrix.build-config }}
run: |
eval "$($HOME/miniconda/bin/conda shell.bash hook)"
conda init
conda activate build
export VCPKG_TOOLCHAIN=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake
python setup.py build ${{ matrix.build-config }}
rm -rf external/vcpkg/buildtrees
- name: Test
run: |
eval "$($HOME/miniconda/bin/conda shell.bash hook)"
conda init
conda activate build
cd build/lib.*
python -m unittest discover accera/test *.py