Skip to content

Commit

Permalink
chore: split build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Maglie committed Nov 3, 2023
1 parent f579ea2 commit f3f8420
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
project: ["file-sharing-producer", "file-sharing-consumer", "vision-qr-code-scanner"]
project: ["file-sharing-producer", "file-sharing-consumer"]

steps:
- uses: actions/checkout@v3
Expand All @@ -37,7 +37,7 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Build
Expand All @@ -49,7 +49,6 @@ jobs:
assemble \
lintDebug
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/vision-qr-code-scanner-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: vision-qr-code-scanner build

on:
push:
branches:
- '*'
paths:
- 'vision-qr-code-scanner/**'
paths-ignore:
- '**.md'
- '**.json'
pull_request:
paths:
- 'vision-qr-code-scanner/**'
paths-ignore:
- '**.md'
- '**.json'

jobs:
build:
# Skip build if head commit contains 'skip ci'
if: "!contains(github.event.head_commit.message, 'skip ci')"

runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu'

- name: Build
env:
PROJECT_DIR: vision-qr-code-scanner
run: |
cd vision-qr-code-scanner
./gradlew --scan --stacktrace \
assemble \
lintDebug
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: |
vision-qr-code-scanner/**/build/test-results/*
vision-qr-code-scanner/**/build/reports/*
8 changes: 5 additions & 3 deletions .github/workflows/work-manager-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: work-manager build

on:
push:
branches:
- '*'
paths:
- 'work-manager/**'
paths-ignore:
Expand Down Expand Up @@ -33,7 +35,7 @@ jobs:
- name: set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: 'zulu'

- name: Build
Expand All @@ -51,5 +53,5 @@ jobs:
with:
name: test-results
path: |
**/build/test-results/*
**/build/reports/*
work-manager/**/build/test-results/*
work-manager/**/build/reports/*

0 comments on commit f3f8420

Please sign in to comment.