Taro L. Saito 520309cc6f Update CI to trigger tests on Makefile and VERSION changes
- Add Makefile* pattern to catch all Makefile variants
- Add **/VERSION pattern to catch VERSION files anywhere in repo
- Ensures tests run when native build configuration or versions change

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 09:54:31 -07:00

65 lines
1.6 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- master
- main
jobs:
changes:
runs-on: ubuntu-latest
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- '**.scala'
- '**.java'
- '**.sbt'
- '.github/workflows/*.yml'
- '**.so'
- '**.dll'
- 'src/main/resources/**'
- 'project/build.properties'
- '.scalafmt.conf'
- 'sbt'
- 'sbt.bat'
- 'Makefile*'
- '**/VERSION'
code_format:
name: code format
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: scalafmt test
run: ./sbt scalafmtCheckAll
test-jdk:
strategy:
matrix:
version: [ '8', '11', '17', '21' ]
name: test jdk${{ matrix.version }}
needs: changes
if: ${{ needs.changes.outputs.code == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.version }}
- uses: actions/cache@v4
with:
path: ~/.cache
key: ${{ runner.os }}-jdk${{ matrix.version }}-${{ hashFiles('**/*.sbt') }}
restore-keys: ${{ runner.os }}-jdk${{ matrix.version }}-
- name: Test
run: ./sbt test