Skip to content

Create list-versions.py and download-and-unpackage.sh #2

Create list-versions.py and download-and-unpackage.sh

Create list-versions.py and download-and-unpackage.sh #2

Workflow file for this run

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/checkout@v3.5.3
- name: List Python versions
id: python-versions
run: |
cd target
for mode in short long; do
echo "$mode=$(./list-versions.py --$mode)" >> $GITHUB_OUTPUT
done
- uses: actions/setup-python@v4.6.1
with:
python-version: ${{ steps.python-versions.outputs.short }}
# TODO: build these in CI as well
- name: Download target Python builds
run: |
cd target
for version in ${{ steps.python-versions.outputs.long }}; do
./download-and-unpackage.sh prefix $version
done
- 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. COMPILE_SDK_VERSION can then be removed from Common.java,
# since it's not used anywhere else.
- 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: Create local.properties
run: |
for version in 8 11 17; do
echo chaquopy.java.home.$version=${!JAVA_HOME_${version}_X64}
done > product/local.properties
- name: Build
run: |
cd product
./gradlew publish
- uses: actions/upload-artifact@v3.1.2
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