Skip to content

Bump to build-tools 35.0.2 #16

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: github-actions
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly

- package-ecosystem: npm
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly
51 changes: 0 additions & 51 deletions .github/workflows/build.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build pull request

on:
workflow_dispatch:
pull_request:
branches:
- dev

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
target_arch: [x86_64, x86, arm64-v8a, armeabi-v7a]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r27c
add-to-path: false

- name: Patch
run: bash ./patch.sh

- name: Compile protoc
run: |
mkdir -p src/protobuf/build
pushd src/protobuf/build
cmake -GNinja -Dprotobuf_BUILD_TESTS=OFF ..
ninja -j$(nproc --all)
popd

- name: Compile aapt2
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
PROTOC_PATH: "/${{ github.workspace }}/src/protobuf/build/protoc"
run: bash ./build.sh ${{ matrix.target_arch }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: aapt2-${{ matrix.target_arch }}
path: ${{ github.workspace }}/build/bin/aapt2-*
if-no-files-found: error
29 changes: 29 additions & 0 deletions .github/workflows/open_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Open a PR to main

on:
push:
branches:
- dev
workflow_dispatch:

env:
MESSAGE: Merge branch `${{ github.head_ref || github.ref_name }}` to `main`

permissions:
pull-requests: write

jobs:
pull-request:
name: Open pull request
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Open pull request
uses: repo-sync/pull-request@v2
with:
destination_branch: 'main'
pr_title: 'chore: ${{ env.MESSAGE }}'
pr_body: 'This pull request will ${{ env.MESSAGE }}.'
pr_draft: true
101 changes: 101 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Release

on:
workflow_dispatch:
push:
branches:
- main
- dev

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
target_arch: [x86_64, x86, arm64-v8a, armeabi-v7a]
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'true'

- name: Setup NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r27c
add-to-path: false

- name: Patch
run: bash ./patch.sh

- name: Compile protoc
run: |
mkdir -p src/protobuf/build
pushd src/protobuf/build
cmake -GNinja -Dprotobuf_BUILD_TESTS=OFF ..
ninja -j$(nproc --all)
popd

- name: Compile aapt2
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
PROTOC_PATH: "/${{ github.workspace }}/src/protobuf/build/protoc"
run: bash ./build.sh ${{ matrix.target_arch }}

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: aapt2-${{ matrix.target_arch }}
path: ${{ github.workspace }}/build/bin/aapt2-*
if-no-files-found: error

release:
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
attestations: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# Make sure the release step uses its own credentials:
# https://github.com/cycjimmy/semantic-release-action#private-packages
persist-credentials: false

- name: Download all built artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
merge-multiple: true

- name: Generate attestations
if: ${{ steps.release.outputs.release_created }}
uses: actions/attest-build-provenance@v2
with:
subject-path: ./artifacts/aapt2-*

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: 'npm'

- name: Install dependencies
run: npm install

- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
fingerprint: ${{ vars.GPG_FINGERPRINT }}

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm exec semantic-release
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bin/
build/
build/
# For CI
artifacts/
40 changes: 28 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[submodule "src/expat"]
shallow = true
path = src/expat
url = https://android.googlesource.com/platform/external/expat.git
url = https://android.googlesource.com/platform/external/expat
[submodule "src/fmtlib"]
shallow = true
path = src/fmtlib
url = https://android.googlesource.com/platform/external/fmtlib.git
url = https://android.googlesource.com/platform/external/fmtlib
[submodule "src/boringssl"]
shallow = true
path = src/boringssl
url = https://boringssl.googlesource.com/boringssl.git
url = https://android.googlesource.com/platform/external/boringssl
[submodule "src/incremental_delivery"]
shallow = true
path = src/incremental_delivery
Expand All @@ -21,31 +21,27 @@
[submodule "src/libpng"]
shallow = true
path = src/libpng
url = https://android.googlesource.com/platform/external/libpng.git
url = https://android.googlesource.com/platform/external/libpng
[submodule "src/pcre"]
shallow = true
path = src/pcre
url = https://android.googlesource.com/platform/external/pcre.git
[submodule "src/zopfli"]
shallow = true
path = src/zopfli
url = https://android.googlesource.com/platform/external/zopfli
url = https://android.googlesource.com/platform/external/pcre
[submodule "src/protobuf"]
shallow = true
path = src/protobuf
url = https://android.googlesource.com/platform/external/protobuf
[submodule "src/logging"]
shallow = true
path = src/logging
url = https://android.googlesource.com/platform/system/logging.git
url = https://android.googlesource.com/platform/system/logging
[submodule "src/selinux"]
shallow = true
path = src/selinux
url = https://android.googlesource.com/platform/external/selinux.git
url = https://android.googlesource.com/platform/external/selinux
[submodule "src/core"]
shallow = true
path = src/core
url = https://android.googlesource.com/platform/system/core.git
url = https://android.googlesource.com/platform/system/core
[submodule "src/base"]
shallow = true
path = src/base
Expand All @@ -54,3 +50,23 @@
shallow = true
path = src/libziparchive
url = https://android.googlesource.com/platform/system/libziparchive
[submodule "src/soong"]
shallow = true
path = src/soong
url = https://android.googlesource.com/platform/build/soong
[submodule "src/unwinding"]
shallow = true
path = src/unwinding
url = https://android.googlesource.com/platform/system/unwinding
[submodule "src/jsoncpp"]
shallow = true
path = src/jsoncpp
url = https://android.googlesource.com/platform/external/jsoncpp
[submodule "src/googletest"]
shallow = true
path = src/googletest
url = https://android.googlesource.com/platform/external/googletest
[submodule "src/native"]
shallow = true
path = src/native
url = https://android.googlesource.com/platform/frameworks/native
45 changes: 45 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"branches": [
"main",
{
"name": "dev",
"prerelease": true
}
],
"plugins": [
[
"@semantic-release/commit-analyzer", {
"releaseRules": [
{ "type": "build", "scope": "Needs bump", "release": "patch" }
]
}
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "VERSION"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@saithodev/semantic-release-backmerge",
{
backmergeBranches: [{"from": "main", "to": "dev"}],
clearWorkspace: true
}
],
[
"@semantic-release/github",
{
successComment: false,
assets: [
{
"path": "artifacts/aapt2-*"
}
]
}
]
]
}
Loading