Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Add Alpine Linux to GitHub Actions CI #1750

Closed
wants to merge 16 commits into from
27 changes: 27 additions & 0 deletions .github/docker_images/alpine_linux/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0 OR ISC

FROM alpine:latest

ARG CC=gcc
ARG CXX=g++

VOLUME ["awslc"]

RUN apk --no-cache add bash \
clang \
build-base \
cmake \
ninja \
go \
perl \
linux-headers

WORKDIR /awslc

ENV CC=${CC}
ENV CXX=${CXX}

COPY .github/docker_images/alpine_linux/entry.sh /

ENTRYPOINT ["/entry.sh"]
18 changes: 18 additions & 0 deletions .github/docker_images/alpine_linux/entry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0 OR ISC

set -ex -o pipefail

CHECK_FIPS="$1"

if [[ "${CHECK_FIPS}" == "0" ]]; then
echo "Testing AWS-LC Non-FIPS"
tests/ci/run_posix_tests.sh
elif [[ "${CHECK_FIPS}" == "1" ]]; then
echo "Testing AWS-LC FIPS"
tests/ci/run_fips_tests.sh
else
exit 1
fi
45 changes: 45 additions & 0 deletions .github/workflows/actions-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,51 @@ jobs:
run: |
docker run -v "${{ github.workspace }}:/awslc" "gcc-4.8"

# alpine-linux:
# needs: [sanity-test-run]
# strategy:
# fail-fast: false
# matrix:
# fips: [0, 1]
# compiler: [
# --build-arg CC=clang --build-arg CXX=clang++,
# --build-arg CC=gcc --build-arg CXX=g++
# ]
# runs-on: ubuntu-latest
# env:
# DOCKER_BUILDKIT: 1
# steps:
# - uses: actions/checkout@v4
# - name: Build Docker Image
# run: |
# docker build -t alpine_linux \
# -f .github/docker_images/alpine_linux/Dockerfile \
# ${{ matrix.compiler }} \
# .
# - name: Run tests
# run: |
# docker run -v "${{ github.workspace }}:/awslc" alpine_linux ${{ matrix.fips }}

alpine-linux-arm64:
needs: [sanity-test-run]
strategy:
fail-fast: false
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '>=1.18'
- name: Build Docker Image
run: |
brew install --cask docker
docker build -t alpine_linux \
--platform=linux/arm64 \
-f .github/docker_images/alpine_linux/Dockerfile .
- name: Run tests
run: |
docker run -v "${{ github.workspace }}:/awslc" alpine_linux 0

# TODO: Investigate sudden hanging tests and failures in GHA runners (P114059413)
# MSVC-SDE-32-bit:
# needs: [sanity-test-run]
Expand Down
Loading