forked from lcompilers/lpython
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (71 loc) · 2.34 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
name: LPython CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
Build:
name: LPython CI (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
environment-file: ci/environment.yml
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: Install Windows Conda Packages
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: conda install m2-bison=3.0.4 ninja
- name: Install Linux / macOS Conda Packages
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
shell: bash -l {0}
run: conda install bison=3.4
- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
- name: Setup Platform (Linux)
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
echo "LFORTRAN_CMAKE_GENERATOR=Unix Makefiles" >> $GITHUB_ENV
echo "WIN=0" >> $GITHUB_ENV
echo "MACOS=0" >> $GITHUB_ENV
- name: Setup Platform (macOS)
if: contains(matrix.os, 'macos')
shell: bash -l {0}
run: |
echo "LFORTRAN_CMAKE_GENERATOR=Unix Makefiles" >> $GITHUB_ENV
echo "WIN=0" >> $GITHUB_ENV
echo "MACOS=1" >> $GITHUB_ENV
- name: Build and test (Linux / macOS)
shell: bash -l {0}
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
xonsh ci/build.xsh
- name: Build and test (Windows)
if: contains(matrix.os, 'windows')
shell: cmd
run: |
set CONDA_INSTALL_LOCN=C:\\Miniconda
call %CONDA_INSTALL_LOCN%\Scripts\activate.bat
call conda activate test
set LFORTRAN_CMAKE_GENERATOR=Ninja
set WIN=1
set MACOS=0
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
xonsh ci\build.xsh