Skip to content

add explicit permissions #236

add explicit permissions

add explicit permissions #236

Workflow file for this run

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:
# FIXME - re-enable - working
# 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: 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 -lsaR
RUN_CONTAINER_TEST=./native-test-binaries/.github/scripts/run-container-test.py
chmod u+x $RUN_CONTAINER_TEST
$RUN_CONTAINER_TEST --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