-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: build for watchos and tvos (#57)
- Loading branch information
Showing
4 changed files
with
36 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,14 @@ on: | |
- 'main' | ||
|
||
env: | ||
BUILDER_VERSION: v0.8.18 | ||
BUILDER_VERSION: v0.9.1 | ||
BUILDER_SOURCE: releases | ||
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net | ||
PACKAGE_NAME: aws-crt-swift | ||
LINUX_BASE_IMAGE: ubuntu-16-x64 | ||
RUN: ${{ github.run_id }}-${{ github.run_number }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_REGION: us-east-1 | ||
|
||
jobs: | ||
lint: | ||
|
@@ -32,81 +34,39 @@ jobs: | |
uses: norio-nomura/[email protected] | ||
env: | ||
DIFF_BASE: ${{ github.base_ref }} | ||
ubuntu: | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: | ||
- aws-crt-swift-5-ubuntu-16-x64 | ||
- ubuntu-x64 | ||
- al2-x64 | ||
- centos-x64 | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages | ||
- 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/${{ 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 | ||
al2: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: | ||
- aws-crt-swift-5-al2-x64 | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages | ||
- name: Build ${{ env.PACKAGE_NAME }} + consumers | ||
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/${{ 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 | ||
centos: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: | ||
- aws-crt-swift-5-centos-x64 | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages | ||
- 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/${{ 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 | ||
aws s3 cp --debug s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh | ||
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-swift-5-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }} | ||
osx: | ||
runs-on: macos-11 | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Build ${{ env.PACKAGE_NAME }} + consumers | ||
run: | | ||
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" | ||
chmod a+x builder | ||
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream | ||
ios: | ||
./builder build -p ${{ env.PACKAGE_NAME }} | ||
devices: | ||
runs-on: macos-11 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- ios | ||
- tvos | ||
- watchos | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Build ${{ env.PACKAGE_NAME }} + consumers | ||
run: | | ||
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" | ||
chmod a+x builder | ||
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream --target=ios-armv8 | ||
./builder build -p ${{ env.PACKAGE_NAME }} --target=${{ matrix.target }}-armv8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters