diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 0000000..23bf98e --- /dev/null +++ b/.github/workflows/push.yaml @@ -0,0 +1,57 @@ +name: Push + +on: + push: + branches: + - main + +jobs: + build: + strategy: + matrix: + os: [ ubuntu-latest ] + java-distribution: + - temurin + - zulu + - adopt-hotspot + - adopt-openj9 + - liberica + - microsoft + - corretto + - semeru + - oracle + - dragonwell + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up "${{ matrix.java-distribution }}" JDK 21 + uses: actions/setup-java@v4 + with: + distribution: ${{ matrix.java-distribution }} + java-version: 21 + + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: gradle-${{ runner.os }} + + - name: Install PCRE (Ubuntu) + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt-get install -y libpcre2-8-0 + + - name: Build with Gradle (Ubuntu) + if: ${{ matrix.os == 'ubuntu-latest' }} + run: ./gradlew build -Dpcre2.library.path=/usr/lib/x86_64-linux-gnu + + - name: Run tests (Ubuntu) + if: ${{ matrix.os == 'ubuntu-latest' }} + run: ./gradlew test -Dpcre2.library.path=/usr/lib/x86_64-linux-gnu