-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create CI workflow with build-product job
- Loading branch information
Showing
3 changed files
with
81 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: [master] | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-product: | ||
runs-on: macos-latest # The fastest runner | ||
steps: | ||
- uses: actions/[email protected] | ||
|
||
# TODO: generate versions from Common.java | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: | | ||
3.8 | ||
3.9 | ||
3.10 | ||
3.11 | ||
- name: Install Python requirements | ||
run: pip install -r product/runtime/requirements-build.txt | ||
|
||
# TODO: move versions to a single location used by both CI and | ||
# runtime/build.gradle. | ||
- name: Set up Android SDK | ||
run: "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager | ||
'cmake;3.22.1' 'ndk;22.1.7171670' 'platforms;android-30'" | ||
|
||
- name: Unpackage target | ||
run: | | ||
target_dir=$(pwd)/maven/com/chaquo/python/target | ||
mkdir -p $target_dir | ||
cd $target_dir | ||
# TODO: generate versions from Common.java | ||
for version in 3.8.16-0 3.9.13-1 3.10.6-1 3.11.0-2; do | ||
mkdir $target_dir/$version | ||
cd $target_dir/$version | ||
target_url=https://repo.maven.apache.org/maven2/com/chaquo/python/target | ||
wget -r -l1 -nd -A .zip -e robots=off -U Mozilla/5.0 $base_url/$version | ||
cd $GITHUB_WORKSPACE/target | ||
./unpackage-target.sh ./prefix $target_dir/$version | ||
done | ||
- name: Create local.properties | ||
run: | | ||
for version in 8 11; do | ||
java_home=${!JAVA_HOME_${version}_X64} | ||
echo chaquopy.java.home.$version=$java_home >> product/local.properties | ||
done | ||
- name: Build | ||
run: | | ||
cd product | ||
./gradlew publish | ||
- uses: actions/[email protected] | ||
with: | ||
name: maven | ||
path: maven | ||
if-no-files-found: error | ||
|
||
# test-gradle-plugin: | ||
# needs: build-product | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# os: [macos, ubuntu, windows] | ||
# agp-version: ["8.0"] # TODO: generate from directory listing | ||
|
||
# runs-on: ${{ matrix.os }}-latest | ||
# steps: | ||
# - FIXME |
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
/prefix | ||
*/build |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |