Files
c3c/.github/workflows/main.yml

102 lines
2.6 KiB
YAML

name: CI
on:
push:
branches: [ master, dev, ci_testing ]
pull_request:
branches: [ master ]
jobs:
build-msys2-mingw:
runs-on: windows-latest
strategy:
matrix:
build_type: [Release, Debug]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git binutils mingw-w64-x86_64-mlir mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchain mingw-w64-x86_64-llvm mingw-w64-x86_64-polly mingw-w64-x86_64-python mingw-w64-x86_64-lld
- name: CMake
run: |
mkdir build && cd build
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
- name: Build testproject
run: |
cd resources/testproject
../../build/c3c build --debug-log
- name: run compiler tests
run: |
cd test
python3 src/tester.py ../build/c3c.exe test_suite/
build-msys2-clang:
runs-on: windows-latest
strategy:
matrix:
build_type: [Release, Debug]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: CLANG64
update: true
install: git binutils mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-toolchain mingw-w64-clang-x86_64-python
- name: CMake
run: |
mkdir build && cd build
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
- name: Build testproject
run: |
cd resources/testproject
../../build/c3c build --debug-log
- name: run compiler tests
run: |
cd test
python3 src/tester.py ../build/c3c.exe test_suite/
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Release, Debug]
steps:
- uses: actions/checkout@v1
- name: (Ubuntu) Download LLVM
run: |
sudo apt-get install zlib1g zlib1g-dev clang-12 libllvm12 llvm-12 llvm-12-dev llvm-12-runtime liblld-12-dev liblld-12 python3
- name: CMake
run: |
mkdir build && cd build
cmake .. -DLLVM_DIR=/usr/lib/llvm-12/cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build .
- name: Build testproject
run: |
cd resources/testproject
../../build/c3c build --debug-log
- name: run compiler tests
run: |
cd test
python3 src/tester.py ../build/c3c test_suite/