Add test workflows (#3) #3
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: Sanity Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - 'v*.*.*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Setup Ubuntu Native Libs | |
| run: | | |
| sudo apt update | |
| sudo apt install libglib2.0-dev | |
| - name: Setup Bazel | |
| uses: bazel-contrib/setup-bazel@0.15.0 | |
| with: | |
| bazelisk-cache: true | |
| disk-cache: ${{ github.workflow }} | |
| - name: Checkout Test Case Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Lmh-java/bazel_pkg_config_test | |
| - name: Update Commit Hash in Test Cases | |
| run: | | |
| chmod +x ./update_commit_hash.sh | |
| ./update_commit_hash.sh ${{ github.sha }} | |
| - name: Run WORKSPACE Test Case | |
| working-directory: ./workspace_test | |
| run: | | |
| bazel run //:main | |
| - name: Run BzlMod Test Case | |
| working-directory: ./bzlmod_test | |
| run: | | |
| bazel run //:main |