Skip to content

Conversation

@cartland
Copy link
Contributor

@cartland cartland commented May 5, 2025

This PR standardizes GitHub Actions triggers in workflow files within .github/workflows/.

The goal is to ensure workflows run consistently on push, pull_request, and workflow_dispatch events where appropriate.

This is part of a batch of pull requests across repositories owned by the android organization on GitHub.

Project Owner: Please review the changes carefully to ensure they are correct and appropriate for this project before approving and merging.

  • If you do not think this change is appropriate (e.g., a workflow should NOT run on one of these triggers), please leave a comment explaining why.
  • If you think the goal is appropriate but notice a mistake in the implementation, please leave a comment detailing the mistake.

@gemini-code-assist
Copy link

Note

The files in this pull request are not supported by Gemini Code Assist.

@cartland
Copy link
Contributor Author

cartland commented May 5, 2025

CI is not working on this repository, likely due to this issue:

The ubuntu-18.04 environment is deprecated, consider switching to ubuntu-20.04(ubuntu-latest), or ubuntu-22.04 instead. For more details see actions/runner-images#6002

I will try to update the environment to ubuntu-20.04.

Fixes this error: The ubuntu-18.04 environment is deprecated, consider switching to ubuntu-20.04(ubuntu-latest),
or ubuntu-22.04 instead. For more details see actions/runner-images#6002
@cartland cartland closed this May 5, 2025
@cartland cartland reopened this May 5, 2025
Responding to error: "This is a scheduled Ubuntu 20.04 retirement.
Ubuntu 20.04 LTS runner will be removed on 2025-04-15.
For more details, see actions/runner-images#11101""
@cartland
Copy link
Contributor Author

cartland commented May 5, 2025

ubuntu-20.04 also has a deprecation plan. Switching to ubuntu-latest so that we need to do fewer updates on our end. Since we're required to update so often, CI will probably be more stable with latest than a specific version number.

cartland added 3 commits May 5, 2025 15:11
The builds are failing:
* Error: Missing download info for actions/upload-artifact@v1
Copy link

@ray-google ray-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cartland added 16 commits July 10, 2025 14:46
Verified by running:

    .github/scripts/gradlew_recursive.sh assembleDebug
This commit updates the build workflow to set up JDK 11 in
addition to JDK 17. This ensures that the project can be built
with both JDK versions.
This commit reverts the JDK version used for the Camera2Basic
project to 1.8. This change addresses compatibility issues
encountered with the newer JDK 17.

The following changes were made:

- Modified `Camera2Basic/build.gradle` to use `VERSION_1_8`.
- Removed `org.gradle.java.home` from
  `Camera2Basic/gradle.properties`.
- Removed `org.gradle.java.home` from
  `CameraXExtensions/gradle.properties`.
- Added `.java-version` files to specify java versions.
This commit adds `.java-version` files to specify the java
versions to be used for different modules within the project.
This ensures that the correct JDK is used for each module,
avoiding compatibility issues.

The following changes were made:

- Added `.java-version` 17 file to root directory.
- Added `.java-version` 11 file to `Camera2SlowMotion` directory.
- Added `.java-version` 11 file to `CameraUtils` directory.
- Added `.java-version` 11 file to `HdrViewfinder` directory.
The HdrViewfinder sample was failing to build due to outdated Gradle and
Android Gradle Plugin versions. This commit updates the sample to use
more modern tools and libraries, and fixes the resulting build errors.

Changes:
- Updated Gradle to 7.5.1
- Updated Android Gradle Plugin to 7.2.0
- Updated compileSdkVersion and targetSdkVersion to 33
- Enabled AndroidX and migrated dependencies
- Updated Java imports to use AndroidX
- Fixed manifest to explicitly set `android:exported`
This commit refactors the `android.yml` workflow file to
create separate workflows for each module in the project.
This change improves build parallelism and reduces the
overall build time.

The following changes were made:

- Deleted the `gradlew_recursive.sh` script.
- Modified `android.yml` to define individual jobs for each
  module (CameraXBasic, CameraXExtensions, CameraXVideo,
  CameraXAdvanced, CameraX-MLKit, Camera2Basic,
  Camera2Extensions, Camera2Video, Camera2SlowMotion,
  CameraUtils, HdrViewfinder).
- Each job checks out the code, sets up the appropriate JDK,
  builds the project, zips the artifacts, and uploads the
  artifacts.
This commit updates the `android.yml` workflow file to
specify the `working-directory` for each job's build and
zip steps. This change ensures that the commands are
executed in the correct directory.

The following changes were made:

- Added `working-directory` to the `Build project` step.
- Added `working-directory` to the `Zip artifacts` step.
This commit updates the names of the uploaded artifacts in the
`android.yml` workflow file to avoid artifact naming conflicts.

The following changes were made:

- Renamed artifact name from `assemble` to `camerax_basic_assemble`
  for CameraXBasic module.
- Renamed artifact name from `assemble` to
  `camerax_extensions_assemble` for CameraXExtensions module.
- Renamed artifact name from `assemble` to `camerax_video_assemble`
  for CameraXVideo module.
- Renamed artifact name from `assemble` to
  `camerax_advanced_assemble` for CameraXAdvanced module.
- Renamed artifact name from `assemble` to `camerax_mlkit_assemble`
  for CameraX-MLKit module.
- Renamed artifact name from `assemble` to `camera2_basic_assemble`
  for Camera2Basic module.
- Renamed artifact name from `assemble` to
  `camera2_extensions_assemble` for Camera2Extensions module.
- Renamed artifact name from `assemble` to `camera2_video_assemble`
  for Camera2Video module.
- Renamed artifact name from `assemble` to
  `camera2_slowmotion_assemble` for Camera2SlowMotion module.
- Renamed artifact name from `assemble` to `camerautils_assemble` for
  CameraUtils module.
- Renamed artifact name from `assemble` to `hdrviewfinder_assemble`
  for HdrViewfinder module.
This commit updates the Gradle Wrapper in the HdrViewfinder
sample to a more recent version. This resolves compatibility
issues and ensures that the project can be built with modern
tools.

Changes:
- Updated gradle-wrapper.jar
- Updated gradle-wrapper.properties to use Gradle 7.3.3
- Updated gradlew and gradlew.bat scripts
@cartland
Copy link
Contributor Author

@madebymozart let me know how you want to support HdrViewfinder. I might remove it from the list of projects to run in this PR to unblock the others, but we should have a plan to either fix or deprecate HdrViewfinder.

This commit removes the HdrViewfinder job from the
`android.yml` workflow file.

The following changes were made:

- Removed the `HdrViewfinder` job from `android.yml`.
@cartland cartland merged commit ffa2a26 into android:main Jul 18, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants