mirror of
https://github.com/rife2/bld
synced 2026-08-04 15:07:46 +02:00
Compare commits
8 commits
f604f22474
...
ad40825ef4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad40825ef4 | ||
|
|
74b71c79c1 | ||
|
|
95a219d540 | ||
|
|
c8dbd3179e | ||
|
|
7c119da471 | ||
|
|
fd5662f12d | ||
|
|
94a9435f43 | ||
|
|
21783356f9 |
195
.github/workflows/bld.yml
vendored
195
.github/workflows/bld.yml
vendored
|
|
@ -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
|
|
||||||
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue