Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions dependencies #424

Merged
merged 9 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/gradle-ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
# Copyright (c) SRG SSR. All rights reserved.
# License information is available from the LICENSE file.
#
org.gradle.configuration-cache=false
org.gradle.daemon=false
46 changes: 17 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,6 @@ concurrency:
cancel-in-progress: true

jobs:
build-windows:
name: Build on Windows
runs-on: windows-latest
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Build project
run: ./gradlew :pillarbox-demo:assembleProdDebug :pillarbox-demo-tv:assembleDebug

android-lint:
name: Android Lint
runs-on: ubuntu-latest
Expand All @@ -44,8 +26,9 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- 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: Run Android Lint
Expand All @@ -69,8 +52,9 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- 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: Run Detekt
Expand All @@ -94,18 +78,20 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- 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: Run Dependency Analysis
run: ./gradlew buildHealth
- name: Archive analysis report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: dependency-analysis-report
path: build/reports/dependency-analysis/build-health-report.txt
overwrite: true

unit-test:
name: Unit Tests
Expand All @@ -122,8 +108,9 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- 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: Run Unit Tests
Expand Down Expand Up @@ -168,8 +155,9 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- 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: Run Android Tests
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build on Windows

on:
push:
branches:
- main
pull_request:

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

jobs:
build-on-windows:
name: Build on Windows
runs-on: windows-latest
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle; cp .github/gradle-ci.properties ~/.gradle/gradle.properties
- name: Build project
run: ./gradlew :pillarbox-demo:assembleProdDebug :pillarbox-demo-tv:assembleDebug
27 changes: 27 additions & 0 deletions .github/workflows/dependency_graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Submit dependency graph

on:
push:
branches:
- main

jobs:
submit-dependency-graph:
name: Submit dependency graph
runs-on: ubuntu-latest
permissions:
contents: write
env:
USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Submit dependency graph
uses: gradle/actions/dependency-submission@v3
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
19 changes: 19 additions & 0 deletions .github/workflows/gradle_wrapper_validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Gradle Wrapper validation

on:
push:
branches:
- main
pull_request:

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

jobs:
gradle-wrapper-validation:
name: Gradle Wrapper validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
6 changes: 3 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Print the last commit sha
run: echo ${{ github.sha }}
- id: should_run
name: Check that the last commit was made in the last 24h
if: ${{ github.event_name == 'schedule' }}
Expand Down Expand Up @@ -72,7 +70,9 @@ jobs:
java-version: '17'
distribution: 'temurin'
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/gradle-build-action@v2
- uses: gradle/actions/setup-gradle@v3
with:
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Assemble nightly release
run: ./gradlew assembleNightlyRelease
- name: Upload artifact to Firebase App Distribution
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Loading