Skip to content

Commit 34d7e8e

Browse files
authored
chore: add mac and windows to ci (#29)
1 parent cadb15f commit 34d7e8e

File tree

2 files changed

+51
-38
lines changed

2 files changed

+51
-38
lines changed

.github/workflows/ci.yaml

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,57 @@ on:
77
- '!main'
88

99
env:
10-
BUILDER_VERSION: v0.8.0
10+
BUILDER_VERSION: v0.8.22
1111
BUILDER_SOURCE: releases
1212
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
1313
PACKAGE_NAME: aws-crt-kotlin
14-
LINUX_BASE_IMAGE: ubuntu-16-x64
1514
RUN: ${{ github.run_id }}-${{ github.run_number }}
1615

1716
jobs:
1817
linux-compat:
1918
runs-on: ubuntu-latest
20-
strategy:
21-
matrix:
22-
image:
23-
- manylinux2014-x64
24-
#- manylinux2014-x86 until we find 32-bit linux binaries we can use
2519
steps:
26-
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
27-
- name: Checkout Sources
28-
uses: actions/checkout@v2
29-
with:
30-
submodules: true
31-
- name: Build ${{ env.PACKAGE_NAME }}
32-
run: |
33-
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
34-
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ matrix.image }}:${{ env.BUILDER_VERSION }}
35-
docker pull $DOCKER_IMAGE
36-
docker run --mount type=bind,source=$(pwd),target=/root/${{ env.PACKAGE_NAME }} \
37-
--env GITHUB_REF $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --build-dir=/root/${{ env.PACKAGE_NAME }} --spec=downstream
20+
- name: Checkout sources
21+
uses: actions/checkout@v2
22+
- uses: actions/cache@v2
23+
with:
24+
path: |
25+
~/.gradle/caches
26+
~/.gradle/wrapper
27+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
28+
restore-keys: |
29+
${{ runner.os }}-gradle-
30+
- name: Build and Test ${{ env.PACKAGE_NAME }}
31+
run: |
32+
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
33+
chmod a+x builder.pyz
34+
./builder.pyz build -p ${{ env.PACKAGE_NAME }}
3835
36+
macos-compat:
37+
runs-on: macos-latest
38+
steps:
39+
- name: Checkout sources
40+
uses: actions/checkout@v2
41+
- uses: actions/cache@v2
42+
with:
43+
path: |
44+
~/.gradle/caches
45+
~/.gradle/wrapper
46+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
47+
restore-keys: |
48+
${{ runner.os }}-gradle-
49+
- name: Build and Test ${{ env.PACKAGE_NAME }}
50+
run: |
51+
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
52+
chmod a+x builder.pyz
53+
./builder.pyz build -p ${{ env.PACKAGE_NAME }}
54+
55+
windows-compat:
56+
runs-on: windows-latest
57+
steps:
58+
- name: Checkout sources
59+
uses: actions/checkout@v2
60+
- name: Build and Test ${{ env.PACKAGE_NAME }}
61+
run: |
62+
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
63+
python3 builder.pyz build -p ${{ env.PACKAGE_NAME }}

builder.json

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"variables": {
55
"gradlew": "{source_dir}/gradlew -p {source_dir}"
66
},
7+
"imports": [
8+
"JDK8"
9+
],
10+
"build_dir": "target/cmake-build",
11+
"env": {
12+
"JAVA_HOME": "{java_home}"
13+
},
714
"build_steps": [
815
"{gradlew} assemble"
916
],
@@ -13,25 +20,6 @@
1320
"test_steps": [
1421
"{gradlew} test allTests"
1522
],
16-
"imports": [
17-
"JDK8"
18-
],
19-
"build_dir": "target/cmake-build",
20-
"env": {
21-
"JAVA_HOME": "{java_home}"
22-
},
23-
"hosts": {
24-
"ubuntu": {
25-
"packages": [
26-
"openjdk-8-jdk-headless"
27-
]
28-
},
29-
"debian": {
30-
"packages": [
31-
"openjdk-8-jdk-headless"
32-
]
33-
}
34-
},
3523
"targets": {
3624
"linux": {
3725
"imports": [

0 commit comments

Comments
 (0)