Skip to content

Commit 6855775

Browse files
authored
Add CI jobs for shared-libs (#100)
Also fix windows-vc14 (x86) job so it actually uses vc14, and actually builds x86
1 parent c03a30e commit 6855775

2 files changed

Lines changed: 24 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- '!main'
88

99
env:
10-
BUILDER_VERSION: v0.7.0
10+
BUILDER_VERSION: v0.8.7
1111
BUILDER_SOURCE: releases
1212
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
1313
PACKAGE_NAME: aws-c-s3
@@ -80,31 +80,40 @@ jobs:
8080
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ env.LINUX_BASE_IMAGE }}:${{ env.BUILDER_VERSION }}
8181
docker pull $DOCKER_IMAGE
8282
docker run --mount type=bind,source=$(pwd),target=/root/${{ env.PACKAGE_NAME }} --env GITHUB_REF --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --compiler=gcc-${{ matrix.version }}
83+
linux-shared-libs:
84+
runs-on: ubuntu-latest
85+
steps:
86+
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
87+
- name: Build ${{ env.PACKAGE_NAME }}
88+
run: |
89+
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
90+
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-${{ env.LINUX_BASE_IMAGE }}:${{ env.BUILDER_VERSION }}
91+
docker pull $DOCKER_IMAGE
92+
docker run --env GITHUB_REF --env AWS_ACCESS_KEY_ID --env AWS_SECRET_ACCESS_KEY --env AWS_DEFAULT_REGION $DOCKER_IMAGE build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
8393
windows:
8494
runs-on: windows-latest
8595
steps:
86-
- name: Checkout Sources
87-
uses: actions/checkout@v2
8896
- name: Build ${{ env.PACKAGE_NAME }} + consumers
8997
run: |
9098
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
91-
python builder.pyz build -p ${{ env.PACKAGE_NAME }} downstream
99+
python builder.pyz build -p ${{ env.PACKAGE_NAME }}
92100
windows-vc14:
93101
runs-on: windows-latest
94102
strategy:
95103
matrix:
96104
arch: [x86, x64]
97105
steps:
98-
- uses: ilammy/msvc-dev-cmd@v1
99-
with:
100-
toolset: 14.0
101-
arch: ${{ matrix.arch }}
102-
uwp: false
103-
spectre: true
104106
- name: Build ${{ env.PACKAGE_NAME }} + consumers
105107
run: |
106108
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
107-
python builder.pyz build -p ${{ env.PACKAGE_NAME }} downstream
109+
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --target windows-${{ matrix.arch }} --compiler msvc-14
110+
windows-shared-libs:
111+
runs-on: windows-latest
112+
steps:
113+
- name: Build ${{ env.PACKAGE_NAME }} + consumers
114+
run: |
115+
python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
116+
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
108117
osx:
109118
runs-on: macos-latest
110119
steps:

tests/s3_tester.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
#include <stdlib.h>
2121
#include <time.h>
2222

23+
#if _MSC_VER
24+
# pragma warning(disable : 4232) /* function pointer to dll symbol */
25+
#endif
26+
2327
const struct aws_byte_cursor g_test_body_content_type = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("text/plain");
2428
const struct aws_byte_cursor g_test_s3_region = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("us-west-2");
2529
const struct aws_byte_cursor g_test_bucket_name = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("aws-crt-canary-bucket");

0 commit comments

Comments
 (0)