Skip to content

修正 LLVM 类型说明中的笔误 (#61) #46

修正 LLVM 类型说明中的笔误 (#61)

修正 LLVM 类型说明中的笔误 (#61) #46

Workflow file for this run

name: Pull Request Check
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Release
LLVM_VERSION: 16.0
jobs:
build:
strategy:
matrix:
os: [ "ubuntu-22.04", "macos-14" ]
backend: [ "llvm", "pcode" ]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Build
env:
BUILD_TYPE: ${{env.BUILD_TYPE}}
run: bash ./scripts/build.sh ${{matrix.backend}}
- name: Unit test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
test:
needs: build
strategy:
matrix:
os: [ "ubuntu-22.04", "macos-14" ]
stage: [ "llvm", "pcode", "mips" ]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install llvm
if: ${{ matrix.stage == 'llvm' }}
uses: KyleMayes/install-llvm-action@v2
with:
version: ${{env.LLVM_VERSION}}
- name: Setup llvm environment for macos
if: ${{ matrix.stage == 'llvm' && contains(matrix.os, 'macos') }}
run: |
LLVM_PATH=${{ env.LLVM_PATH }}
LLVM_VERSION=${{ env.LLVM_VERSION }}
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: Install mars emulator for mips
if: matrix.stage == 'mips'
run: wget https://github.com/Lord-Turmoil/Mars-for-BUAA/releases/download/v1.0.1/Mars-2024.jar -O ${{github.workspace}}/mars.jar
- name: Run test script
run: python ./scripts/test.py -s ${{matrix.stage}} -d ${{github.workspace}}/testcases