Skip to content
Merged
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
63 changes: 44 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,57 @@ on:
- '!main'

env:
BUILDER_VERSION: v0.8.0
BUILDER_VERSION: v0.8.22
BUILDER_SOURCE: releases
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-crt-kotlin
LINUX_BASE_IMAGE: ubuntu-16-x64
RUN: ${{ github.run_id }}-${{ github.run_number }}

jobs:
linux-compat:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- manylinux2014-x64
#- manylinux2014-x86 until we find 32-bit linux binaries we can use
steps:
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
- name: Checkout Sources
uses: actions/checkout@v2
with:
submodules: true
- name: Build ${{ env.PACKAGE_NAME }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ matrix.image }}:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --mount type=bind,source=$(pwd),target=/root/${{ env.PACKAGE_NAME }} \
--env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --build-dir=/root/${{ env.PACKAGE_NAME }} --spec=downstream
- name: Checkout sources
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build and Test ${{ env.PACKAGE_NAME }}
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
chmod a+x builder.pyz
./builder.pyz build -p ${{ env.PACKAGE_NAME }}

macos-compat:
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build and Test ${{ env.PACKAGE_NAME }}
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
chmod a+x builder.pyz
./builder.pyz build -p ${{ env.PACKAGE_NAME }}

windows-compat:
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Build and Test ${{ env.PACKAGE_NAME }}
run: |
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
python3 builder.pyz build -p ${{ env.PACKAGE_NAME }}
26 changes: 7 additions & 19 deletions builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
"variables": {
"gradlew": "{source_dir}/gradlew -p {source_dir}"
},
"imports": [
"JDK8"
],
"build_dir": "target/cmake-build",
"env": {
"JAVA_HOME": "{java_home}"
},
"build_steps": [
"{gradlew} assemble"
],
Expand All @@ -13,25 +20,6 @@
"test_steps": [
"{gradlew} test allTests"
],
"imports": [
"JDK8"
],
"build_dir": "target/cmake-build",
"env": {
"JAVA_HOME": "{java_home}"
},
"hosts": {
"ubuntu": {
"packages": [
"openjdk-8-jdk-headless"
]
},
"debian": {
"packages": [
"openjdk-8-jdk-headless"
]
}
},
"targets": {
"linux": {
"imports": [
Expand Down