Skip to content

Commit

Permalink
Merge branch 'master' into 2274-optimize-forms-calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
f-odhiambo authored Jan 15, 2024
2 parents 4490eec + 30a07d7 commit 8752c6b
Show file tree
Hide file tree
Showing 154 changed files with 9,874 additions and 1,972 deletions.
3 changes: 0 additions & 3 deletions .github/actions/commonSetup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ runs:
with:
distribution: temurin
java-version: "17"
- name: Make files executable
shell: bash
run: chmod +x ./gradlew

- name: "Setup Gradle"
uses: gradle/gradle-build-action@v2
Expand Down
44 changes: 30 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: "GitHub Actions: Build"
name: "Build"

# Controls when the action will run. Triggers the workflow on push or pull request
# events for the `master` branch
Expand All @@ -22,49 +22,65 @@ on:
tags:
build*
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
# Run once a week (even if no new code or PRs) to detect random regressions
- cron: '12 13 * * 2'

env:
# Allow precise monitoring of the save/restore of Gradle User Home by `gradle-build-action`
# See https://github.com/marketplace/actions/gradle-build-action?version=v2.1.1#cache-debugging-and-analysis
GRADLE_BUILD_ACTION_CACHE_DEBUG_ENABLED: true
GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: "fhir" # change this to invalidate cache
# A workflow run is made up of one or more jobs that can run sequentially or in parallel

concurrency:
# github.head_ref uniquely identifies Pull Requests (but is not available when building branches like main or master)
# github.ref is the fallback used when building for workflows triggered by push
# Note that || are fallback values (not "concatenations")
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true # Use e.g. ${{ github.ref != 'refs/heads/main' }} (or master, until #2180) to only cancel for PRs not on branch

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build will compile APK, test APK and run tests, lint, etc.
build:
runs-on: ubuntu-22.04-8core
timeout-minutes: 60
permissions:
actions: read
contents: read

runs-on: ubuntu-22.04-64core
strategy:
fail-fast: false

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Fetch origin/master for spotless ratchet to work
# https://github.com/diffplug/spotless/issues/1242
fetch-depth: 0

- name: Setup machine
uses: ./.github/actions/commonSetup

- name: Spotless check
run: ./gradlew spotlessCheck --scan --stacktrace
run: ./gradlew spotlessCheck --scan --full-stacktrace

- name: Build with Gradle
run: ./gradlew build --scan --stacktrace
- name: Build (full) with Gradle
run: ./gradlew build --scan --full-stacktrace

- name: Check with Gradle
run: ./gradlew check --scan --stacktrace
run: ./gradlew check --scan --full-stacktrace

- name: Release artifacts to local repo
run: ./gradlew publishReleasePublicationToCIRepository --scan
- name: Upload maven repo
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: maven-repository
path: build/ci-repo
Expand All @@ -76,7 +92,7 @@ jobs:
# Upload the build dir for all the modules for diagnosis
- name: Upload build dir
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build
path: build.zip
33 changes: 28 additions & 5 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: "CodeQL"

# NB: This GitHub Action for https://codeql.github.com seems to be
# a bit "special"; it does not appear to be (easily) possible to just
# integrate and run this as part of the main build.yaml action; see
# https://github.com/google/android-fhir/issues/2310.

on:
push:
branches: [ "master" ]
Expand All @@ -9,10 +28,14 @@ on:
schedule:
- cron: '32 13 * * 2'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || || github.run_id }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-22.04-8core
timeout-minutes: 60
permissions:
actions: read
Expand All @@ -26,16 +49,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Switch to Java 17 from Eclipse Temurin distro
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

Expand All @@ -46,6 +69,6 @@ jobs:
run: ./gradlew --scan --full-stacktrace -Dorg.gradle.dependency.verification=off compileDebugAndroidTestSources

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
31 changes: 31 additions & 0 deletions .github/workflows/runFlank.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
#
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Fail on any error.
set -e

lib_names=("workflow:benchmark" "engine:benchmark" "datacapture" "engine" "knowledge" "workflow")
firebase_pids=()

for lib_name in "${lib_names[@]}"; do
./gradlew :$lib_name:runFlank --scan --stacktrace &
firebase_pids+=("$!")
done

for firebase_pid in ${firebase_pids[*]}; do
wait $firebase_pid
done
12 changes: 6 additions & 6 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ repositories {
}

dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.21.0")
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.22.0")

implementation("com.android.tools.build:gradle:8.1.2")
implementation("com.android.tools.build:gradle:8.1.4")

implementation("app.cash.licensee:licensee-gradle-plugin:1.3.0")
implementation("app.cash.licensee:licensee-gradle-plugin:1.8.0")
implementation("com.osacky.flank.gradle:fladle:0.17.4")

implementation("com.spotify.ruler:ruler-gradle-plugin:1.2.1")
implementation("com.spotify.ruler:ruler-gradle-plugin:1.4.0")

implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r4:6.8.0")
implementation("com.squareup:kotlinpoet:1.12.0")
implementation("ca.uhn.hapi.fhir:hapi-fhir-structures-r4:6.10.0")
implementation("com.squareup:kotlinpoet:1.15.3")
}
Loading

0 comments on commit 8752c6b

Please sign in to comment.