Skip to content

Commit e11112e

Browse files
committed
1 parent 247f695 commit e11112e

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

.github/workflows/pull_request.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@ jobs:
9191
9292
ARTIFACT_EXT=".artifactbundle.tar.gz"
9393
ARTIFACT_NAME="$(basename ${ARTIFACT_PATH} ${ARTIFACT_EXT})"
94+
# depending on whether we are building locally or in a container, add a maker to the name
95+
if [[ "${{ matrix.build-type }}" == 'local' ]]; then
96+
ARTIFACT_NAME="${ARTIFACT_NAME}-local"
97+
fi
9498
# artifacts need a unique name so we suffix with the matrix arch(s)
9599
if [[ ! -z "${{ matrix.arch }}" ]]; then
96100
ARTIFACT_NAME="${ARTIFACT_NAME}-$(echo ${{ matrix.arch }} | tr ',' '-')"
97101
fi
98-
if [[ "${{ matrix.build-type }}" == 'local' ]]; then
99-
ARTIFACT_NAME="${ARTIFACT_NAME}-$(echo ${{ matrix.arch }} | tr ',' '-')-local"
100-
fi
101102
ARTIFACT_NAME="${ARTIFACT_NAME}${ARTIFACT_EXT}"
102103
103104
# There is no way to prevent even a single-file artifact from being zipped:

swift-ci/sdks/android/Dockerfile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66

77
FROM ubuntu:24.04
88

9-
# Versions to fetch
10-
11-
ARG SWIFT_VERSION=scheme:release/6.2
12-
ARG LIBXML2_VERSION=2.12.7
13-
ARG CURL_VERSION=8.7.1
14-
ARG BORINGSSL_VERSION=fips-20220613
15-
ARG ICU_VERSION=maint/maint-69
16-
ARG ZLIB_VERSION=1.3.1
17-
189
# Architecture to build on (empty means x86-64)
1910
ARG OS_ARCH_SUFFIX=
2011

@@ -82,6 +73,8 @@ ENV SWIFT_VERSION=$SWIFT_VERSION \
8273
ICU_VERSION=$ICU_VERSION \
8374
ZLIB_VERSION=$ZLIB_VERSION
8475

76+
ENV SWIFT_BUILD_DOCKER="1"
77+
8578
COPY scripts /scripts
8679
RUN chmod ugo+x /scripts/*
8780

swift-ci/sdks/android/build-docker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $DOCKER build --build-arg OS_ARCH_SUFFIX=$OS_ARCH_SUFFIX --build-arg SWIFT_TOOLC
4949

5050
$DOCKER run -i --rm \
5151
-v ${WORKDIR}/source:/source \
52-
-v ${WORKDIR}/products:/products \
52+
-v ${WORKDIR}/products:/products:rw \
5353
${CONTAINER_NAME} \
5454
/scripts/build.sh \
5555
--source-dir /source \

swift-ci/sdks/android/scripts/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,11 @@ fi
168168
# Find the version numbers of the various dependencies
169169
function describe {
170170
pushd $1 >/dev/null 2>&1
171+
# this is needed for docker containers or else we get the error:
172+
# fatal: detected dubious ownership in repository at '/source/curl'
173+
if [[ "${SWIFT_BUILD_DOCKER}" == "1" ]]; then
174+
git config --global --add safe.directory $(pwd)
175+
fi
171176
git describe --tags
172177
popd >/dev/null 2>&1
173178
}

0 commit comments

Comments
 (0)