-
Notifications
You must be signed in to change notification settings - Fork 7
81 lines (64 loc) · 2.43 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
name: CI
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
Build:
name: LFortran CI (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment_unix.yml
- uses: hendrikmuhs/ccache-action@main
with:
variant: sccache
key: ${{ github.job }}-${{ matrix.os }}
- name: Build (Linux / macOS)
shell: bash -l {0}
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
./build.sh
export PATH=$CONDA_PREFIX/bin:$PATH
export CPATH=$CONDA_PREFIX/include:$CPATH
printenv CPATH
- name: Test (Linux / macOS)
shell: bash -l -e {0}
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
lc --ast-dump tests/test.cpp
lc --extra-arg=-Isrc/runtime/include examples/expr2.c --asr-dump
./run_tests.py
- name: Test2 (Linux / macOS)
shell: bash -l -e {0}
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos')
run: |
which clang
lc examples/expr2.c --backend c --extra-arg="-Isrc/runtime/include" --
lc examples/expr2.c --backend wasm --extra-arg="-Isrc/runtime/include" --
lc examples/expr2.c --backend llvm --extra-arg="-Isrc/runtime/include" --
lc tests/array_01.cpp --backend=llvm --extra-arg="-Isrc/runtime/include" --
lc tests/array_02.cpp --backend=llvm --extra-arg="-Isrc/runtime/include" --
lc tests/array_02.cpp --backend=llvm --extra-arg="-Isrc/runtime/include" --
lc tests/array_03.cpp --backend=llvm --
# Test generating object files
lc examples/expr2.c --backend c --extra-arg="-Isrc/runtime/include" -o c_o -c --
lc examples/expr2.c --backend llvm --extra-arg="-Isrc/runtime/include" -o llvm_o -c --
ls -1
# Test including iostream and span headers
lc tests/span_01.cpp --ast-dump --ast-dump-file="tests/span_01.ast" --extra-arg="-std=c++20" --
cat tests/span_01.ast