Compare commits

...

8 commits

Author SHA1 Message Date
Erik C. Thauvin ad40825ef4
Update GitHub package repository in publish workflow
Some checks are pending
bld-ci / build (./bld, 17, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 22, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 24, macos-latest, false) (push) Waiting to run
bld-ci / build (./bld, 26, macos-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 17, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 22, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 24, windows-latest, false) (push) Waiting to run
bld-ci / build (.\bld.bat, 26, windows-latest, false) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 17, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 22, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 24, ubuntu-latest, true) (push) Waiting to run
bld-ci / build (unittests, password, unittests, mariadb:10.9, mysql:8, gvenzl/oracle-free:latest, gvenzl/oracle-xe:18-slim, postgres:15, ./bld, 26, ubuntu-latest, true) (push) Waiting to run
javadocs-pages / deploy (push) Waiting to run
2026-06-25 16:58:17 -07:00
Erik C. Thauvin 74b71c79c1
Merge pull request #89 from ethauvin/main
Move database name, user and password to the workflow matrix
2026-06-25 16:36:27 -07:00
Erik C. Thauvin 95a219d540
Move database name, user and password to the workflow matrix 2026-06-25 16:02:26 -07:00
Erik C. Thauvin c8dbd3179e
Merge pull request #88 from ethauvin/main
Move database images to the workflow matrix
2026-06-25 15:58:13 -07:00
Erik C. Thauvin 7c119da471
Move database images to the workflow matrix 2026-06-25 15:53:14 -07:00
Erik C. Thauvin fd5662f12d
Merge pull request #87 from ethauvin/main
Set the database tests flags as a workflow environment variable
2026-06-25 15:42:23 -07:00
Erik C. Thauvin 94a9435f43
Set the database tests flags as a workflow environment variable 2026-06-25 15:34:41 -07:00
Erik C. Thauvin 21783356f9
Refactor bld workflow into an easier to configure modular design (#86) 2026-06-25 15:12:26 -07:00
2 changed files with 69 additions and 130 deletions

View file

@ -1,21 +1,54 @@
name: bld-ci name: bld-ci
on: [push, pull_request, workflow_dispatch] on: [ push, pull_request, workflow_dispatch ]
env: env:
REPORTS_DIR: "build/test-results/test/" REPORTS_DIR: "build/test-results/test/"
# Test flags for DB runs
DB_TEST_FLAGS: >-
-Dtest.postgres=true
-Dtest.mysql=true
-Dtest.mariadb=true
-Dtest.oracle=true
-Dtest.oracle-free=true
-DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/bld
-DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
jobs: jobs:
build-linux: build:
runs-on: ubuntu-latest runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
java-version: [ 17, 22, 24, 26 ]
include:
- os: ubuntu-latest
run-db-tests: true
bld-cmd: ./bld
# DB config only for ubuntu jobs
DB_NAME: unittests
DB_USER: unittests
DB_PASSWORD: password
POSTGRES_IMAGE: "postgres:15"
MYSQL_IMAGE: "mysql:8"
MARIADB_IMAGE: "mariadb:10.9"
ORACLE_XE_IMAGE: "gvenzl/oracle-xe:18-slim"
ORACLE_FREE_IMAGE: "gvenzl/oracle-free:latest"
- os: macos-latest
run-db-tests: false
bld-cmd: ./bld
- os: windows-latest
run-db-tests: false
bld-cmd: .\bld.bat
services: services:
oracle: oracle:
image: gvenzl/oracle-xe:18-slim image: ${{ matrix.ORACLE_XE_IMAGE }}
env: env:
ORACLE_RANDOM_PASSWORD: true ORACLE_RANDOM_PASSWORD: true
APP_USER: unittests APP_USER: ${{ matrix.DB_USER }}
APP_USER_PASSWORD: password APP_USER_PASSWORD: ${{ matrix.DB_PASSWORD }}
ports: ports:
- 1521:1521 - 1521:1521
options: >- options: >-
@ -25,11 +58,11 @@ jobs:
--health-retries 10 --health-retries 10
oracle-free: oracle-free:
image: gvenzl/oracle-free:latest image: ${{ matrix.ORACLE_FREE_IMAGE }}
env: env:
ORACLE_RANDOM_PASSWORD: true ORACLE_RANDOM_PASSWORD: true
APP_USER: unittests APP_USER: ${{ matrix.DB_USER }}
APP_USER_PASSWORD: password APP_USER_PASSWORD: ${{ matrix.DB_PASSWORD }}
ports: ports:
- 1522:1521 - 1522:1521
options: >- options: >-
@ -39,11 +72,11 @@ jobs:
--health-retries 10 --health-retries 10
mysql: mysql:
image: mysql:8 image: ${{ matrix.MYSQL_IMAGE }}
env: env:
MYSQL_DATABASE: unittests MYSQL_DATABASE: ${{ matrix.DB_NAME }}
MYSQL_USER: unittests MYSQL_USER: ${{ matrix.DB_USER }}
MYSQL_PASSWORD: password MYSQL_PASSWORD: ${{ matrix.DB_PASSWORD }}
MYSQL_ROOT_PASSWORD: root MYSQL_ROOT_PASSWORD: root
ports: ports:
- 3306:3306 - 3306:3306
@ -54,11 +87,11 @@ jobs:
--health-retries=3 --health-retries=3
mariadb: mariadb:
image: mariadb:10.9 image: ${{ matrix.MARIADB_IMAGE }}
env: env:
MARIADB_DATABASE: unittests MARIADB_DATABASE: ${{ matrix.DB_NAME }}
MARIADB_USER: unittests MARIADB_USER: ${{ matrix.DB_USER }}
MARIADB_PASSWORD: password MARIADB_PASSWORD: ${{ matrix.DB_PASSWORD }}
MARIADB_ROOT_PASSWORD: root MARIADB_ROOT_PASSWORD: root
ports: ports:
- 3307:3306 - 3307:3306
@ -69,148 +102,54 @@ jobs:
--health-retries=3 --health-retries=3
postgres: postgres:
image: postgres:15 image: ${{ matrix.POSTGRES_IMAGE }}
env: env:
POSTGRES_DB: unittests POSTGRES_DB: ${{ matrix.DB_NAME }}
POSTGRES_PASSWORD: password POSTGRES_PASSWORD: ${{ matrix.DB_PASSWORD }}
POSTGRES_PORT: 5432 POSTGRES_USER: ${{ matrix.DB_USER }}
POSTGRES_USER: unittests
options: >- options: >-
--health-cmd pg_isready --health-cmd pg_isready
--health-interval 10s --health-interval 10s
--health-timeout 5s --health-timeout 5s
--health-retries 5 --health-retries=5
ports: ports:
- 5432:5432 - 5432:5432
env:
MYSQL_DATABASE: unittests
MYSQL_USER: root
MYSQL_PASSWORD: root
strategy:
matrix:
java-version: [17, 22, 24, 26]
steps: steps:
- name: Configure git line endings for Windows
if: runner.os == 'Windows'
run: git config --global core.autocrlf input
- name: Checkout source repository - name: Checkout source repository
uses: actions/checkout@v7 uses: actions/checkout@v4
with: with:
clean: true clean: true
submodules: "true" submodules: "true"
fetch-depth: 0 fetch-depth: 0
- name: Set up JDK ${{ matrix.java-version }} - name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5 uses: actions/setup-java@v4
with: with:
distribution: "corretto" distribution: "corretto"
java-version: ${{ matrix.java-version }} java-version: ${{ matrix.java-version }}
check-latest: true check-latest: true
- name: Cache bld dependencies - name: Cache bld dependencies
id: cache-bld uses: actions/cache@v4
uses: actions/cache@v6
with: with:
path: lib path: lib
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib key: ${{ runner.os }}-bld-java${{ matrix.java-version }}-lib
- name: Compile source - name: Compile source
run: ./bld clean compile run: ${{ matrix.bld-cmd }} clean compile
- name: Run tests - name: Run tests
id: tests id: tests
run: >- run: >-
./bld test ${{ matrix.bld-cmd }} test
-Dtest.postgres=true -Dtest.mysql=true -Dtest.mariadb=true -Dtest.oracle=true -Dtest.oracle-free=true
-DtestsBadgeUrl=https://rife2.com/tests-badge/update/com.uwyn.rife2/bld
-DtestsBadgeApiKey=${{ secrets.TESTS_BADGE_API_KEY }}
--reports-dir=${{ env.REPORTS_DIR }} --reports-dir=${{ env.REPORTS_DIR }}
${{ matrix.run-db-tests && env.DB_TEST_FLAGS || '' }}
- name: Run reporter - name: Run reporter
if: always() && steps.tests.outcome == 'failure' if: always() && steps.tests.outcome == 'failure'
run: ./bld --offline reporter --all run: ${{ matrix.bld-cmd }} --offline reporter --all
build-macos:
runs-on: macos-latest
strategy:
matrix:
java-version: [17, 20, 21, 22, 23, 24, 25]
steps:
- name: Checkout source repository
uses: actions/checkout@v7
with:
clean: true
submodules: "true"
fetch-depth: 0
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: ${{ matrix.java-version }}
check-latest: true
- name: Cache bld dependencies
id: cache-bld
uses: actions/cache@v5
with:
path: lib
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
restore-keys: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
- name: Compile source
run: ./bld clean compile
- name: Run tests
id: tests
run: ./bld test --reports-dir=${{ env.REPORTS_DIR }}
- name: Run reporter
if: always() && steps.tests.outcome == 'failure'
run: ./bld --offline reporter --all
build-windows:
runs-on: windows-latest
strategy:
matrix:
java-version: [17, 20, 21, 22, 23, 24, 25]
steps:
- name: Configure git line endings
run: git config --global core.autocrlf input
- name: Checkout source repository
uses: actions/checkout@v7
with:
clean: true
submodules: "true"
fetch-depth: 0
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
distribution: "corretto"
java-version: ${{ matrix.java-version }}
check-latest: true
- name: Cache bld dependencies
id: cache-bld
uses: actions/cache@v5
with:
path: lib
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
restore-keys: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
- name: Compile source
run: .\bld.bat clean compile
- name: Run tests
id: tests
run: .\bld.bat test --reports-dir=${{ env.REPORTS_DIR }}
- name: Run reporter
if: always() && steps.tests.outcome == 'failure'
run: .\bld.bat --offline reporter --all

View file

@ -51,7 +51,7 @@ jobs:
- name: Publish - name: Publish
run: >- run: >-
./bld publish ./bld publish
-Dbld.repo.github=https://maven.pkg.github.com/rife2/bld -Dbld.repo.github=https://maven.pkg.github.com/rife2/bld-antlr4
-Dbld.repo.github.username=${{ secrets.GH_USERNAME }} -Dbld.repo.github.username=${{ secrets.GH_USERNAME }}
-Dbld.repo.github.password=${{ secrets.GH_PASSWORD }} -Dbld.repo.github.password=${{ secrets.GH_PASSWORD }}
-Dbld.repo.rife2-snapshots=https://repo.rife2.com/snapshots/ -Dbld.repo.rife2-snapshots=https://repo.rife2.com/snapshots/
@ -65,4 +65,4 @@ jobs:
- name: Delete GnuPG data - name: Delete GnuPG data
if: always() if: always()
run: rm -rfv $HOME/.gnupg run: rm -rfv $HOME/.gnupg