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
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
on: [ push, pull_request, workflow_dispatch ]
|
||||
|
||||
env:
|
||||
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:
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
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:
|
||||
oracle:
|
||||
image: gvenzl/oracle-xe:18-slim
|
||||
image: ${{ matrix.ORACLE_XE_IMAGE }}
|
||||
env:
|
||||
ORACLE_RANDOM_PASSWORD: true
|
||||
APP_USER: unittests
|
||||
APP_USER_PASSWORD: password
|
||||
APP_USER: ${{ matrix.DB_USER }}
|
||||
APP_USER_PASSWORD: ${{ matrix.DB_PASSWORD }}
|
||||
ports:
|
||||
- 1521:1521
|
||||
options: >-
|
||||
|
|
@ -25,11 +58,11 @@ jobs:
|
|||
--health-retries 10
|
||||
|
||||
oracle-free:
|
||||
image: gvenzl/oracle-free:latest
|
||||
image: ${{ matrix.ORACLE_FREE_IMAGE }}
|
||||
env:
|
||||
ORACLE_RANDOM_PASSWORD: true
|
||||
APP_USER: unittests
|
||||
APP_USER_PASSWORD: password
|
||||
APP_USER: ${{ matrix.DB_USER }}
|
||||
APP_USER_PASSWORD: ${{ matrix.DB_PASSWORD }}
|
||||
ports:
|
||||
- 1522:1521
|
||||
options: >-
|
||||
|
|
@ -39,11 +72,11 @@ jobs:
|
|||
--health-retries 10
|
||||
|
||||
mysql:
|
||||
image: mysql:8
|
||||
image: ${{ matrix.MYSQL_IMAGE }}
|
||||
env:
|
||||
MYSQL_DATABASE: unittests
|
||||
MYSQL_USER: unittests
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_DATABASE: ${{ matrix.DB_NAME }}
|
||||
MYSQL_USER: ${{ matrix.DB_USER }}
|
||||
MYSQL_PASSWORD: ${{ matrix.DB_PASSWORD }}
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
ports:
|
||||
- 3306:3306
|
||||
|
|
@ -54,11 +87,11 @@ jobs:
|
|||
--health-retries=3
|
||||
|
||||
mariadb:
|
||||
image: mariadb:10.9
|
||||
image: ${{ matrix.MARIADB_IMAGE }}
|
||||
env:
|
||||
MARIADB_DATABASE: unittests
|
||||
MARIADB_USER: unittests
|
||||
MARIADB_PASSWORD: password
|
||||
MARIADB_DATABASE: ${{ matrix.DB_NAME }}
|
||||
MARIADB_USER: ${{ matrix.DB_USER }}
|
||||
MARIADB_PASSWORD: ${{ matrix.DB_PASSWORD }}
|
||||
MARIADB_ROOT_PASSWORD: root
|
||||
ports:
|
||||
- 3307:3306
|
||||
|
|
@ -69,148 +102,54 @@ jobs:
|
|||
--health-retries=3
|
||||
|
||||
postgres:
|
||||
image: postgres:15
|
||||
image: ${{ matrix.POSTGRES_IMAGE }}
|
||||
env:
|
||||
POSTGRES_DB: unittests
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_PORT: 5432
|
||||
POSTGRES_USER: unittests
|
||||
POSTGRES_DB: ${{ matrix.DB_NAME }}
|
||||
POSTGRES_PASSWORD: ${{ matrix.DB_PASSWORD }}
|
||||
POSTGRES_USER: ${{ matrix.DB_USER }}
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
--health-retries=5
|
||||
ports:
|
||||
- 5432:5432
|
||||
|
||||
env:
|
||||
MYSQL_DATABASE: unittests
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: root
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [17, 22, 24, 26]
|
||||
|
||||
steps:
|
||||
- name: Configure git line endings for Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: git config --global core.autocrlf input
|
||||
|
||||
- name: Checkout source repository
|
||||
uses: actions/checkout@v7
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
clean: true
|
||||
submodules: "true"
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK ${{ matrix.java-version }}
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "corretto"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
check-latest: true
|
||||
|
||||
- name: Cache bld dependencies
|
||||
id: cache-bld
|
||||
uses: actions/cache@v6
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: lib
|
||||
key: ${{ runner.os }}-bld-java${{ matrix.java-version}}-lib
|
||||
key: ${{ runner.os }}-bld-java${{ matrix.java-version }}-lib
|
||||
|
||||
- name: Compile source
|
||||
run: ./bld clean compile
|
||||
run: ${{ matrix.bld-cmd }} clean compile
|
||||
|
||||
- name: Run tests
|
||||
id: tests
|
||||
run: >-
|
||||
./bld 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 }}
|
||||
${{ matrix.bld-cmd }} test
|
||||
--reports-dir=${{ env.REPORTS_DIR }}
|
||||
${{ matrix.run-db-tests && env.DB_TEST_FLAGS || '' }}
|
||||
|
||||
- name: Run reporter
|
||||
if: always() && steps.tests.outcome == 'failure'
|
||||
run: ./bld --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
|
||||
run: ${{ matrix.bld-cmd }} --offline reporter --all
|
||||
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
|
|
@ -51,7 +51,7 @@ jobs:
|
|||
- name: Publish
|
||||
run: >-
|
||||
./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.password=${{ secrets.GH_PASSWORD }}
|
||||
-Dbld.repo.rife2-snapshots=https://repo.rife2.com/snapshots/
|
||||
|
|
@ -65,4 +65,4 @@ jobs:
|
|||
|
||||
- name: Delete GnuPG data
|
||||
if: always()
|
||||
run: rm -rfv $HOME/.gnupg
|
||||
run: rm -rfv $HOME/.gnupg
|
||||
|
|
|
|||
Loading…
Reference in a new issue