19 feat support multiple input files #43
Workflow file for this run
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: [ main, 3-feat-ci-add-build-workflow ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build on ${{ 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 | |
| - name: Install dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake python3 | |
| # Install LLVM and Clang 20 | |
| wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-20 main" | |
| sudo apt-get update | |
| sudo apt-get install -y llvm-20 llvm-20-dev clang-20 libclang-20-dev | |
| echo "LLVM_DIR=/usr/lib/llvm-20/lib/cmake/llvm" >> $GITHUB_ENV | |
| echo "Clang_DIR=/usr/lib/llvm-20/lib/cmake/clang" >> $GITHUB_ENV | |
| - name: Install dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install cmake python llvm@20 | |
| echo "LLVM_DIR=$(brew --prefix llvm@20)/lib/cmake/llvm" >> $GITHUB_ENV | |
| echo "Clang_DIR=$(brew --prefix llvm@20)/lib/cmake/clang" >> $GITHUB_ENV | |
| echo "$(brew --prefix llvm@20)/bin" >> $GITHUB_PATH | |
| - name: Configure and Build (Linux/macOS) | |
| if: runner.os == 'Linux' || runner.os == 'macOS' | |
| run: | | |
| mkdir -p build && cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release \ | |
| -DLLVM_DIR=${{ env.LLVM_DIR }} \ | |
| -DClang_DIR=${{ env.Clang_DIR }} \ | |
| -DUSE_SHARED_LIB=OFF \ | |
| -DBUILD_TESTS=OFF | |
| cmake --build . --config Release | |
| - name: Test Stack Usage Analyzer (Linux/macOS) | |
| if: runner.os == 'Linux' || runner.os == 'macOS' | |
| run: | | |
| python3 run_test.py |