fix UB with missing return #732
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: macos | |
on: | |
push: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build-and-test: | |
name: Build and test ${{matrix.build-type}} mode | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
build-type: [Debug, Release] | |
steps: | |
- name: Clone recursively | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Setup ccache | |
uses: Chocobo1/setup-ccache-action@v1 | |
with: | |
ccache_options: max_size=500M | |
override_cache_key: mac-latest-ccache-${{matrix.build-type}} | |
- name: Configure | |
run: CC=gcc-11 CXX=g++-11 cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DTHORIN_BUILD_TESTING=ON | |
- name: Cache LLVM and Clang | |
id: cache-llvm | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./llvm | |
key: llvm-14.0.0-mac | |
- name: Install LLVM and Clang | |
uses: KyleMayes/[email protected] | |
with: | |
version: "14.0.0" | |
cached: ${{ steps.cache-llvm.outputs.cache-hit }} | |
- name: Install FileCheck | |
uses: i3h/download-release-asset@v1 | |
with: | |
owner: fodinabor | |
repo: FileCheckBuild | |
tag: latest | |
file: FileCheck-x86_64-mac | |
path: ${{github.workspace}}/bin | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install LIT | |
run: | | |
python3 -m pip install lit | |
ln -s ${{github.workspace}}/bin/FileCheck-x86_64-mac ${{github.workspace}}/bin/FileCheck | |
chmod +x ${{github.workspace}}/bin/FileCheck | |
- name: Prepare LLVM | |
run: | | |
LLVM_PATH=${{ env.LLVM_PATH }} | |
LLVM_VERSION=${{ matrix.clang }} | |
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV | |
echo "CPATH=$LLVM_PATH/lib/clang/$LLVM_VERSION/include/" >> $GITHUB_ENV | |
echo "LDFLAGS=-L$LLVM_PATH/lib" >> $GITHUB_ENV | |
echo "CPPFLAGS=-I$LLVM_PATH/include" >> $GITHUB_ENV | |
echo "CC=$LLVM_PATH/bin/clang" >> $GITHUB_ENV | |
echo "CXX=$LLVM_PATH/bin/clang++" >> $GITHUB_ENV | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build -v --config ${{matrix.build-type}} --target thorin-gtest thorin thorin_affine | |
- name: Run lit test suite | |
working-directory: ${{github.workspace}}/build | |
run: | | |
export PATH=${{github.workspace}}/bin:$PATH | |
cmake --build ${{github.workspace}}/build -v --config ${{matrix.build-type}} --target check | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: | | |
export PATH=${{github.workspace}}/bin:$PATH | |
ctest --verbose -C ${{matrix.build-type}} --output-on-failure |