mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
156 lines
4.4 KiB
YAML
156 lines
4.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, dev, ci_testing ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build-msys2-mingw:
|
|
runs-on: windows-latest
|
|
strategy:
|
|
# Don't abort runners if a single one fails
|
|
fail-fast: false
|
|
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
|
|
if: ${{ false }}
|
|
strategy:
|
|
# Don't abort runners if a single one fails
|
|
fail-fast: false
|
|
matrix:
|
|
build_type: [Release, Debug]
|
|
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: CLANG64
|
|
update: false
|
|
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:
|
|
# Don't abort runners if a single one fails
|
|
fail-fast: false
|
|
matrix:
|
|
build_type: [Release, Debug]
|
|
llvm_version: [12, 13, 14]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install common deps
|
|
run: |
|
|
sudo apt-get install zlib1g zlib1g-dev python3
|
|
|
|
- name: Install Clang ${{ matrix.llvm_version }}
|
|
run: |
|
|
wget https://apt.llvm.org/llvm.sh
|
|
chmod +x ./llvm.sh
|
|
sudo ./llvm.sh ${{ matrix.llvm_version }}
|
|
sudo apt-get install -y liblld-${{matrix.llvm_version}}
|
|
|
|
if [[ "${{matrix.llvm_version}}" > 12 ]]; then
|
|
sudo apt-get install -y libmlir-${{matrix.llvm_version}} libmlir-${{matrix.llvm_version}}-dev mlir-${{matrix.llvm_version}}-tools
|
|
fi
|
|
|
|
- name: CMake
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake .. -DCMAKE_C_COMPILER=clang-${{matrix.llvm_version}} -DCMAKE_CXX_COMPILER=clang++-${{matrix.llvm_version}} -DC3_LLVM_VERSION=${{matrix.llvm_version}} -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/
|
|
|
|
build-mac:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
# Don't abort runners if a single one fails
|
|
fail-fast: false
|
|
matrix:
|
|
build_type: [Release, Debug]
|
|
llvm_version: [12]
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Download LLVM
|
|
run: |
|
|
brew install llvm@${{ matrix.llvm_version }} botan
|
|
echo "/usr/local/opt/llvm@${{ matrix.llvm_version }}/bin" >> $GITHUB_PATH
|
|
TMP_PATH=$(xcrun --show-sdk-path)/user/include
|
|
echo "CPATH=$TMP_PATH" >> $GITHUB_ENV
|
|
|
|
- name: CMake
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake .. -DC3_LLVM_VERSION=${{matrix.llvm_version}} -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/
|