Skip to content

Commit 1eff2a0

Browse files
committed
Merge branch 'release/9.2.0'
2 parents ff5a378 + adf68d3 commit 1eff2a0

File tree

1,099 files changed

+134339
-17349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,099 files changed

+134339
-17349
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Orchestrates setup of all build tools based on project requirements.
2+
#
3+
# Author: John Grimes
4+
5+
name: Setup Build Tools
6+
description: Orchestrates setup of Java, R, Python, and Bun build environments.
7+
8+
inputs:
9+
java:
10+
description: Set up Java/Maven environment.
11+
required: false
12+
default: "true"
13+
java-version:
14+
description: Java version to install.
15+
required: false
16+
default: "21"
17+
r:
18+
description: Set up R environment.
19+
required: false
20+
default: "false"
21+
r-version:
22+
description: R version to install.
23+
required: false
24+
default: "4.1.3"
25+
r-pandoc:
26+
description: Install Pandoc for R documentation.
27+
required: false
28+
default: "false"
29+
python:
30+
description: Set up Python/uv environment.
31+
required: false
32+
default: "false"
33+
bun:
34+
description: Set up Bun runtime.
35+
required: false
36+
default: "false"
37+
sonar-cache:
38+
description: Enable SonarQube cache.
39+
required: false
40+
default: "false"
41+
42+
runs:
43+
using: composite
44+
steps:
45+
- name: Set up Java and Maven
46+
if: inputs.java == 'true'
47+
uses: ./.github/actions/setup-java-maven
48+
with:
49+
java-version: ${{ inputs.java-version }}
50+
enable-sonar-cache: ${{ inputs.sonar-cache }}
51+
52+
- name: Set up R
53+
if: inputs.r == 'true'
54+
uses: ./.github/actions/setup-r
55+
with:
56+
r-version: ${{ inputs.r-version }}
57+
install-pandoc: ${{ inputs.r-pandoc }}
58+
59+
- name: Set up Python
60+
if: inputs.python == 'true'
61+
uses: ./.github/actions/setup-python
62+
63+
- name: Set up Bun
64+
if: inputs.bun == 'true'
65+
uses: oven-sh/setup-bun@v2
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Sets up Java with Maven caching and required environment variables.
2+
#
3+
# Author: John Grimes
4+
5+
name: Setup Java and Maven
6+
description: Sets up Java with Maven repository caching, SonarQube caching, and MAVEN_OPTS.
7+
8+
inputs:
9+
java-version:
10+
description: Java version to install.
11+
required: false
12+
default: "21"
13+
distribution:
14+
description: JDK distribution to use.
15+
required: false
16+
default: zulu
17+
enable-sonar-cache:
18+
description: Enable SonarQube cache.
19+
required: false
20+
default: "true"
21+
22+
runs:
23+
using: composite
24+
steps:
25+
- name: Set up JDK
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: ${{ inputs.java-version }}
29+
distribution: ${{ inputs.distribution }}
30+
31+
- name: Cache local Maven repository
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.m2/repository
35+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
36+
restore-keys: |-
37+
${{ runner.os }}-maven-
38+
39+
- name: Cache SonarQube packages
40+
if: inputs.enable-sonar-cache == 'true'
41+
uses: actions/cache@v4
42+
with:
43+
path: ~/.sonar/cache
44+
key: ${{ runner.os }}-sonar
45+
restore-keys: ${{ runner.os }}-sonar
46+
47+
# The add-exports and add-opens flags are required for Java 21.
48+
- name: Set MAVEN_OPTS
49+
shell: bash
50+
run: echo "MAVEN_OPTS=--add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED" >> $GITHUB_ENV
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Sets up Python environment using uv with caching.
2+
#
3+
# Author: John Grimes
4+
5+
name: Setup Python
6+
description: Sets up Python using uv with caching enabled.
7+
8+
inputs:
9+
enable-cache:
10+
description: Enable uv cache.
11+
required: false
12+
default: "true"
13+
14+
runs:
15+
using: composite
16+
steps:
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
19+
with:
20+
enable-cache: ${{ inputs.enable-cache }}

.github/actions/setup-r/action.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Sets up R environment with package caching, TinyTeX, and libcurl.
2+
#
3+
# Author: John Grimes
4+
5+
name: Setup R
6+
description: Sets up R with package caching, TinyTeX, libcurl, and optionally Pandoc.
7+
8+
inputs:
9+
r-version:
10+
description: R version to install.
11+
required: false
12+
default: "4.1.3"
13+
install-pandoc:
14+
description: Install Pandoc for documentation generation.
15+
required: false
16+
default: "false"
17+
18+
runs:
19+
using: composite
20+
steps:
21+
- name: Set up R
22+
uses: r-lib/actions/setup-r@v2
23+
with:
24+
r-version: ${{ inputs.r-version }}
25+
use-public-rspm: true
26+
27+
- name: Set up Pandoc
28+
if: inputs.install-pandoc == 'true'
29+
uses: r-lib/actions/setup-pandoc@v2
30+
31+
- name: Cache R packages
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ runner.temp }}/Library
35+
key: r-packages-${{ runner.os }}-${{ hashFiles('lib/R/DESCRIPTION.src') }}
36+
restore-keys: r-packages-${{ runner.os }}-
37+
38+
# TinyTeX and libcurl are required for building the R package documentation.
39+
- name: Install TinyTeX and libcurl
40+
shell: bash
41+
run: |
42+
wget --max-redirect=0 -qO- "https://tinytex.yihui.org/install-bin-unix.sh" | sh
43+
echo "$HOME/bin" >> $GITHUB_PATH
44+
sudo apt-get install -y libcurl4-openssl-dev
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Uploads test reports, coverage, and build artifacts.
2+
#
3+
# Author: John Grimes
4+
5+
name: Upload Test Artifacts
6+
description: Uploads test reports, coverage reports, and optionally JARs and language packages.
7+
8+
inputs:
9+
name-prefix:
10+
description: Prefix for artifact names (e.g., "server-").
11+
required: false
12+
default: ""
13+
path-prefix:
14+
description: Path prefix for finding files (e.g., "server/").
15+
required: false
16+
default: ""
17+
include-jars:
18+
description: Include built JAR files.
19+
required: false
20+
default: "false"
21+
include-python:
22+
description: Include Python wheel.
23+
required: false
24+
default: "false"
25+
include-r:
26+
description: Include R package.
27+
required: false
28+
default: "false"
29+
include-site:
30+
description: Include documentation site.
31+
required: false
32+
default: "false"
33+
34+
runs:
35+
using: composite
36+
steps:
37+
- name: Save test reports
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: ${{ inputs.name-prefix }}surefire-reports
41+
path: ${{ inputs.path-prefix }}**/surefire-reports/
42+
43+
- name: Save coverage reports
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: ${{ inputs.name-prefix }}coverage-reports
47+
path: |
48+
${{ inputs.path-prefix }}**/jacoco.exec
49+
${{ inputs.path-prefix }}**/jacoco.xml
50+
${{ inputs.path-prefix }}**/target/site/jacoco
51+
${{ inputs.path-prefix }}**/target/site/jacoco-aggregate
52+
${{ inputs.path-prefix }}lib/python/**/coverage.xml
53+
54+
- name: Save built JARs
55+
if: inputs.include-jars == 'true'
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: jars
59+
path: |
60+
utilities/target/utilities-*.jar
61+
encoders/target/encoders-*.jar
62+
terminology/target/terminology-*.jar
63+
fhirpath/target/fhirpath-*.jar
64+
library-api/target/library-api-*.jar
65+
library-runtime/target/library-runtime-*.jar
66+
lib/python/target/python-*.jar
67+
lib/R/target/r-*.jar
68+
if-no-files-found: error
69+
70+
- name: Save Python wheel
71+
if: inputs.include-python == 'true'
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: python-wheel
75+
path: lib/python/target/py-dist/pathling-*.whl
76+
77+
- name: Save R package
78+
if: inputs.include-r == 'true'
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: r-package
82+
path: lib/R/target/pathling_*.tar.gz
83+
84+
- name: Save site
85+
if: inputs.include-site == 'true'
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: site
89+
path: site/target/site/

.github/workflows/benchmark.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,40 @@ jobs:
2222
- name: Get workflow run info
2323
id: get_run_info
2424
uses: actions/github-script@v7
25+
env:
26+
RUN_ID: ${{ github.event.inputs.run_id }}
2527
with:
2628
script: |
29+
const runId = parseInt(process.env.RUN_ID, 10);
30+
if (isNaN(runId) || runId <= 0) {
31+
core.setFailed('Invalid run_id: must be a positive integer');
32+
return;
33+
}
2734
const { data: run } = await github.rest.actions.getWorkflowRun({
2835
owner: context.repo.owner,
2936
repo: context.repo.repo,
30-
run_id: ${{ github.event.inputs.run_id }}
37+
run_id: runId
3138
});
3239
core.setOutput('commit_sha', run.head_sha);
40+
core.setOutput('run_id', runId);
3341
3442
- name: Checkout code
3543
uses: actions/checkout@v4
3644
with:
3745
fetch-depth: 0
3846
ref: ${{ steps.get_run_info.outputs.commit_sha }}
3947

40-
- name: Set up JDK
41-
uses: actions/setup-java@v4
48+
- name: Set up build environment
49+
uses: ./.github/actions/setup-build-tools
4250
with:
43-
java-version: 21
44-
distribution: "zulu"
51+
java: "true"
52+
sonar-cache: "false"
4553

4654
- name: Download JARs from specified run
4755
uses: actions/download-artifact@v4
4856
with:
4957
name: jars
50-
run-id: ${{ github.event.inputs.run_id }}
58+
run-id: ${{ steps.get_run_info.outputs.run_id }}
5159
github-token: ${{ secrets.GITHUB_TOKEN }}
5260
path: jars/
5361

0 commit comments

Comments
 (0)