Skip to content

Commit b51cb53

Browse files
authored
Update CI to fix downstream build (awslabs#525)
1 parent 8c15cd7 commit b51cb53

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'main'
77

88
env:
9-
BUILDER_VERSION: v0.9.16
9+
BUILDER_VERSION: v0.9.26
1010
BUILDER_SOURCE: releases
1111
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
1212
PACKAGE_NAME: aws-c-io
@@ -35,7 +35,7 @@ jobs:
3535
- name: Build ${{ env.PACKAGE_NAME }}
3636
run: |
3737
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
38-
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }} downstream
38+
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}
3939
4040
linux-byo-crypto:
4141
runs-on: ubuntu-20.04 # latest
@@ -90,6 +90,17 @@ jobs:
9090
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
9191
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
9292
93+
# Test downstream repos.
94+
# This should not be required because we can run into a chicken and egg problem if there is a change that needs some fix in a downstream repo.
95+
downstream:
96+
runs-on: ubuntu-20.04 # latest
97+
steps:
98+
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
99+
- name: Build ${{ env.PACKAGE_NAME }}
100+
run: |
101+
aws s3 cp s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
102+
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-${{ env.LINUX_BASE_IMAGE }} build downstream -p ${{ env.PACKAGE_NAME }}
103+
93104
windows:
94105
runs-on: windows-2022 # latest
95106
steps:
@@ -129,10 +140,10 @@ jobs:
129140
python .\aws-c-io\build\deps\aws-c-common\scripts\appverifier_ctest.py --build_directory .\aws-c-io\build\aws-c-io
130141
131142
osx:
132-
runs-on: macos-11 # latest
143+
runs-on: macos-12 # latest
133144
steps:
134145
- name: Build ${{ env.PACKAGE_NAME }} + consumers
135146
run: |
136147
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
137148
chmod a+x builder
138-
./builder build -p ${{ env.PACKAGE_NAME }} downstream
149+
./builder build -p ${{ env.PACKAGE_NAME }}

builder.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
}
1111
],
1212
"downstream": [
13+
{ "name": "aws-c-http" },
1314
{ "name": "aws-c-mqtt" },
14-
{ "name": "aws-c-http" }
15+
{ "name": "aws-c-event-stream" }
1516
],
1617
"targets": {
1718
"linux": {

include/aws/io/channel_bootstrap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct aws_client_bootstrap_options {
8282
/* Optional. If none is provided then default settings are used.
8383
* This object is deep-copied by bootstrap.
8484
* */
85-
struct aws_host_resolution_config *host_resolution_config;
85+
const struct aws_host_resolution_config *host_resolution_config;
8686

8787
/* Optional. If provided, callback is invoked when client bootstrap has completely shut down. */
8888
aws_client_bootstrap_shutdown_complete_fn *on_shutdown_complete;

include/aws/io/host_resolver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct aws_host_resolver_vtable {
8686
struct aws_host_resolver *resolver,
8787
const struct aws_string *host_name,
8888
aws_on_host_resolved_result_fn *res,
89-
struct aws_host_resolution_config *config,
89+
const struct aws_host_resolution_config *config,
9090
void *user_data);
9191
/** gives your implementation a hint that an address has some failed connections occuring. Do whatever you want (or
9292
* nothing) about it.
@@ -204,7 +204,7 @@ AWS_IO_API int aws_host_resolver_resolve_host(
204204
struct aws_host_resolver *resolver,
205205
const struct aws_string *host_name,
206206
aws_on_host_resolved_result_fn *res,
207-
struct aws_host_resolution_config *config,
207+
const struct aws_host_resolution_config *config,
208208
void *user_data);
209209

210210
/**

source/host_resolver.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int aws_host_resolver_resolve_host(
6969
struct aws_host_resolver *resolver,
7070
const struct aws_string *host_name,
7171
aws_on_host_resolved_result_fn *res,
72-
struct aws_host_resolution_config *config,
72+
const struct aws_host_resolution_config *config,
7373
void *user_data) {
7474
AWS_ASSERT(resolver->vtable && resolver->vtable->resolve_host);
7575
return resolver->vtable->resolve_host(resolver, host_name, res, config, user_data);
@@ -1252,7 +1252,7 @@ static inline int create_and_init_host_entry(
12521252
struct aws_host_resolver *resolver,
12531253
const struct aws_string *host_name,
12541254
aws_on_host_resolved_result_fn *res,
1255-
struct aws_host_resolution_config *config,
1255+
const struct aws_host_resolution_config *config,
12561256
uint64_t timestamp,
12571257
void *user_data) {
12581258
struct host_entry *new_host_entry = aws_mem_calloc(resolver->allocator, 1, sizeof(struct host_entry));
@@ -1381,7 +1381,7 @@ static int default_resolve_host(
13811381
struct aws_host_resolver *resolver,
13821382
const struct aws_string *host_name,
13831383
aws_on_host_resolved_result_fn *res,
1384-
struct aws_host_resolution_config *config,
1384+
const struct aws_host_resolution_config *config,
13851385
void *user_data) {
13861386
int result = AWS_OP_SUCCESS;
13871387

0 commit comments

Comments
 (0)