forked from servo/servo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,43 +2,25 @@ name: Android | |
on: | ||
workflow_call: | ||
inputs: | ||
production: | ||
required: false | ||
default: false | ||
type: boolean | ||
unit-tests: | ||
required: false | ||
default: false | ||
type: boolean | ||
upload: | ||
required: false | ||
default: false | ||
type: boolean | ||
github-release-id: | ||
profile: | ||
required: false | ||
default: "release" | ||
type: string | ||
workflow_dispatch: | ||
inputs: | ||
production: | ||
profile: | ||
required: false | ||
default: false | ||
type: boolean | ||
unit-tests: | ||
required: false | ||
default: false | ||
type: boolean | ||
upload: | ||
required: false | ||
default: false | ||
type: boolean | ||
default: "release" | ||
type: string | ||
options: ["release", "debug", "production"] | ||
push: | ||
branches: ["try-android"] | ||
|
||
env: | ||
cargo_profile_option: ${{ inputs.production && '--profile production' || '--release' }} | ||
cargo_profile_name: ${{ inputs.production && 'production' || 'release' }} | ||
RUST_BACKTRACE: 1 | ||
SHELL: /bin/bash | ||
SCCACHE_GHA_ENABLED: "true" | ||
CCACHE: "sccache" | ||
CARGO_INCREMENTAL: 0 | ||
|
||
jobs: | ||
|
@@ -60,6 +42,8 @@ jobs: | |
with: | ||
ref: refs/pull/${{ github.event.issue.number || github.event.number }}/head | ||
fetch-depth: 2 | ||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
- name: Install taplo | ||
uses: baptiste0928/cargo-install@v2 | ||
with: | ||
|
@@ -69,36 +53,28 @@ jobs: | |
run: python3 -m pip install --upgrade pip virtualenv | ||
- name: Bootstrap dependencies | ||
run: sudo apt update && python3 ./mach bootstrap | ||
# - name: Tidy | ||
# run: python3 ./mach test-tidy --no-progress --all | ||
- name: Set LIBCLANG_PATH env # needed for bindgen in mozangle | ||
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV | ||
- name: Release build (${{ matrix.arch }} ${{ inputs.production && 'without' || 'with' }} debug assertions) | ||
- name: Build (arch ${{ matrix.arch }} profile ${{ inputs.profile }}) | ||
run: | | ||
export JAVA_HOME="${JAVA_HOME_17_X64}" | ||
python3 ./mach build --android --target ${{ matrix.arch }} ${cargo_profile_option} | ||
# - name: Smoketest | ||
# run: xvfb-run python3 ./mach smoketest ${cargo_profile_option} | ||
- name: Script tests | ||
run: ./mach test-scripts | ||
# - name: Unit tests | ||
# if: ${{ inputs.unit-tests || github.ref_name == 'try-linux' }} | ||
# run: python3 ./mach test-unit --android ${cargo_profile_option} | ||
python3 ./mach build --android --target ${{ matrix.arch }} --${{ inputs.profile }} | ||
# TODO: fix test-android-startup | ||
# - name: Script tests | ||
# run: ./mach test-android-startup | ||
- name: Rename build timing | ||
run: cp -r target/cargo-timings target/cargo-timings-android | ||
run: cp -r target/cargo-timings target/cargo-timings-android-${{ matrix.arch }} | ||
- name: Archive build timing | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: cargo-timings | ||
# Using a wildcard here ensures that the archive includes the path. | ||
path: target/cargo-timings-* | ||
# - name: Lockfile check | ||
# run: ./etc/ci/lockfile_changed.sh | ||
- name: Upload APK artifact for mach package | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: android-${{ matrix.arch }}-${{ env.cargo_profile_name }} | ||
path: target/android/${{ matrix.arch }}/${{ env.cargo_profile_name }}/servoapp.apk | ||
name: android-${{ matrix.arch }}-${{ inputs.profile }} | ||
path: target/android/${{ matrix.arch }}/${{ inputs.profile }}/servoapp.apk | ||
|
||
result: | ||
name: Result | ||
|