test: add rust import tests #1300
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: 🍎 macOS Smoke Tests | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| push: | |
| branches-ignore: | |
| - main | |
| - 'gh-readonly-queue/**' | |
| merge_group: | |
| jobs: | |
| macos_tests_summary: | |
| name: macOS Tests Summary | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check if code files changed | |
| id: changes | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| code: | |
| - 'lib/**' | |
| - 'include/**' | |
| - 'tools/**' | |
| - 'CMakeLists.txt' | |
| - 'cmake/**' | |
| - name: Install dependencies | |
| if: steps.changes.outputs.code == 'true' | |
| run: | | |
| brew install llvm@18 | |
| brew link --force llvm@18 | |
| pip install lit | |
| brew install bison flex ccache | |
| brew link --force bison flex ccache | |
| echo "$(brew --prefix flex)/bin" >> "$GITHUB_PATH" | |
| echo "$(brew --prefix bison)/bin" >> "$GITHUB_PATH" | |
| echo "$(brew --prefix ccache)/libexec" >> "$GITHUB_PATH" | |
| mkdir -p "$HOME/Library/Caches/ccache" | |
| - name: Cache ccache | |
| if: steps.changes.outputs.code == 'true' | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/Library/Caches/ccache | |
| key: ccache-${{ runner.os }}-clang18-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} | |
| restore-keys: | | |
| ccache-${{ runner.os }}-clang18- | |
| - name: Configure and test | |
| if: steps.changes.outputs.code == 'true' | |
| run: | | |
| LLVM_DIR="$(brew --prefix llvm@18)/lib/cmake/llvm" | |
| FLEX_ROOT="$(brew --prefix flex)" | |
| FLEX_INC="$(brew --prefix flex)/include" | |
| cmake -S . -B build \ | |
| -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
| -DLLVM_DIR="$LLVM_DIR" \ | |
| -DFLEX_EXECUTABLE="$(brew --prefix flex)/bin/flex" \ | |
| -DFLEX_INCLUDE_DIR="$FLEX_INC" \ | |
| -DBISON_EXECUTABLE="$(brew --prefix bison)/bin/bison" \ | |
| -DLLVM_ENABLE_ASSERTIONS=ON \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_FLAGS="-I$FLEX_ROOT/include" | |
| ./coverage.sh | |
| - name: Test results | |
| run: | | |
| if [[ "${{ steps.changes.outputs.code }}" == "false" ]]; then | |
| echo "✅ No code changes detected, skipping macOS tests" | |
| else | |
| echo "✅ All macOS tests passed" | |
| fi |