Refine minimap board controls #105
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: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "release/**" | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| GRADLE_USER_HOME: /home/runner/.gradle | |
| BEAR_BLOCKS_PATH: .ci/bear.blocks.yaml | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Ensure Gradle cache dirs | |
| run: mkdir -p "$GRADLE_USER_HOME/caches" "$GRADLE_USER_HOME/wrapper" | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| cache: gradle | |
| - name: Ensure Gradle wrapper executable | |
| run: chmod +x ./gradlew | |
| - name: Build and unit tests | |
| run: ./gradlew --no-daemon :app:test :kernel:test | |
| bear-gates: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-and-test | |
| env: | |
| GRADLE_USER_HOME: /home/runner/.gradle | |
| BEAR_BLOCKS_PATH: .ci/bear.blocks.yaml | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Ensure Gradle cache dirs | |
| run: mkdir -p "$GRADLE_USER_HOME/caches" "$GRADLE_USER_HOME/wrapper" | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| cache: gradle | |
| - name: Ensure Gradle wrapper executable | |
| run: chmod +x ./gradlew | |
| - name: Resolve base ref | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| BASE_REF="origin/${{ github.base_ref }}" | |
| git fetch --no-tags --prune --depth=1 origin "${{ github.base_ref }}" | |
| else | |
| BASE_REF="${{ github.event.before }}" | |
| if [[ -z "$BASE_REF" || "$BASE_REF" == "0000000000000000000000000000000000000000" ]]; then | |
| BASE_REF="HEAD~1" | |
| fi | |
| fi | |
| echo "BASE_REF=$BASE_REF" >> "$GITHUB_ENV" | |
| - name: BEAR compile --all | |
| run: ./gradlew --no-daemon :app:run --args="compile --all --project . --blocks $BEAR_BLOCKS_PATH" | |
| - name: BEAR check --all | |
| run: ./gradlew --no-daemon :app:run --args="check --all --project . --blocks $BEAR_BLOCKS_PATH" | |
| - name: BEAR pr-check --all | |
| run: ./gradlew --no-daemon :app:run --args="pr-check --all --project . --base $BASE_REF --blocks $BEAR_BLOCKS_PATH" | |