Skip to content

Commit

Permalink
Introduce a build step to the build workflow (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
MGaetan89 authored Mar 11, 2024
1 parent ffe0d5d commit 1671716
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,32 @@ on:
types: [ synchronize, opened, reopened, ready_for_review ]

concurrency:
group: build-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Build modules
run: ./gradlew :pillarbox-demo:assembleProdDebug :pillarbox-demo-tv:assembleDebug :pillarbox-player-testutils:assembleDebug

android-lint:
name: Android Lint
runs-on: ubuntu-latest
needs: build
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -42,6 +61,7 @@ jobs:
detekt:
name: Detekt
runs-on: ubuntu-latest
needs: build
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -68,6 +88,7 @@ jobs:
dependency-analysis:
name: Dependency Analysis
runs-on: ubuntu-latest
needs: build
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -96,6 +117,7 @@ jobs:
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
needs: build
permissions:
pull-requests: write
env:
Expand Down Expand Up @@ -136,6 +158,7 @@ jobs:
android-tests:
name: Android Tests
runs-on: ubuntu-latest
needs: build
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:

concurrency:
group: build-on-windows-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dependency_graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main

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

jobs:
submit-dependency-graph:
name: Submit dependency graph
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle_wrapper_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
pull_request:

concurrency:
group: gradle-wrapper-validation-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down

0 comments on commit 1671716

Please sign in to comment.