Merge pull request #8 from Shaikh-Ubaid/arg_c #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- name: Test (Linux / macOS) | |
shell: bash -l -e {0} | |
if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'macos') | |
run: | | |
./src/bin/lc --ast-dump tests/test.cpp | |
./src/bin/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: | | |
# clang from conda does not work so deactivate the conda environment | |
micromamba deactivate | |
which clang | |
which node | |
./src/bin/lc examples/expr2.c --backend c --extra-arg="-Isrc/runtime/include" -- | |
./src/bin/lc examples/expr2.c --backend wasm --extra-arg="-Isrc/runtime/include" -- | |
./src/bin/lc examples/expr2.c --backend llvm --extra-arg="-Isrc/runtime/include" -- | |
./src/bin/lc tests/array_01.cpp --backend=llvm --extra-arg="-Isrc/runtime/include" -- | |
./src/bin/lc tests/array_02.cpp --backend=llvm --extra-arg="-Isrc/runtime/include" -- | |
# Test generating object files | |
./src/bin/lc examples/expr2.c --backend c --extra-arg="-Isrc/runtime/include" -o c_o -c -- | |
./src/bin/lc examples/expr2.c --backend llvm --extra-arg="-Isrc/runtime/include" -o llvm_o -c -- | |
ls -1 |