diable cross compilation #234
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: | |
- '*' | |
- '!main' | |
env: | |
BUILDER_VERSION: v0.8.22 | |
BUILDER_SOURCE: releases | |
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net | |
PACKAGE_NAME: aws-crt-kotlin | |
RUN: ${{ github.run_id }}-${{ github.run_number }} | |
# generated dockcross scripts default to `podman` when installed which | |
# has issues when building with docker then executing via dockcross script which | |
# picks up `podman` instead. | |
OCI_EXE: docker | |
jobs: | |
# build and test for targets: jvm, macoArm64, iosSimulatorArm64, watchosSimulatorArm65, tvosSimulatorArm64 | |
# cross compile native test targets for: linuxArm64, linuxX64, mingwX64 | |
macos-arm: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup build environment | |
uses: ./.github/actions/setup-build | |
- name: Build and Test ${{ env.PACKAGE_NAME }} | |
run: | | |
./gradlew -Paws.sdk.kotlin.crt.disableCrossCompile=true build | |
- name: Generate cross platform test binaries | |
run: | | |
./gradlew crossPlatformTestBinaries | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: test-binaries | |
path: | | |
aws-crt-kotlin/build/bin | |
.github/scripts | |
- name: Save Test Reports | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports-macos-arm | |
path: '**/build/reports' | |
# build and test for targets: jvm, linuxX64 | |
# cross compile for: linuxX64, linuxArm64 | |
# TODO - add mingw as cross compile target | |
linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup build environment | |
uses: ./.github/actions/setup-build | |
- name: Configure Docker Images | |
run: | | |
./docker-images/build-all.sh | |
- name: Build and Test ${{ env.PACKAGE_NAME }} | |
run: | | |
./gradlew build | |
- name: Generate cross platform test binaries | |
run: | | |
./gradlew linuxTestBinaries | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: native-test-binaries | |
path: | | |
aws-crt-kotlin/build/bin | |
.github/scripts | |
- name: Save Test Reports | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-reports-linux | |
path: '**/build/reports' | |
# FIXME - re-enable - working (also if we disable cross compilation we can just run the build task to build targets valid for the given host) | |
# macosX64, iosX64 | |
# macos-x64-native: | |
# runs-on: macos-13 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# submodules: true | |
# - name: Setup build environment | |
# uses: ./.github/actions/setup-build | |
# with: | |
# install-finch: false | |
# - name: Build and Test ${{ env.PACKAGE_NAME }} | |
# run: | | |
# ./gradlew macosX64Test iosX64Test | |
# - name: Save Test Reports | |
# if: failure() | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: test-reports-macos-x64-native | |
# path: '**/build/reports' | |
# test multiple os/architecture combinations for targets: linuxX64, linuxArm64 | |
# re-use test binaries cross compiled on previous build step | |
linux-native: | |
runs-on: ubuntu-22.04 | |
needs: linux | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x64, arm64] | |
os: | |
- ubuntu-22.04 | |
- al2023 | |
- al2 | |
steps: | |
- name: Download test binaries | |
uses: actions/download-artifact@v4 | |
with: | |
name: native-test-binaries | |
path: native-test-binaries | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Test ${{ matrix.os }} on ${{ matrix.arch }} | |
run: | | |
ls -R | |
.github/scripts/run-container-test.py --distro ${{ matrix.distro }} --arch ${{ matrix.arch }} --test-bin-dir ./native-test-binaries/aws-crt-kotlin/build/bin | |
# TODO - linux-native test reports | |
# TODO - windows jvm, windows native, jvm versions | |