Architectures #1
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
name: Architectures | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
bigendian: | |
runs-on: ubuntu-latest | |
env: | |
setup_image_path: "~/project/artifacts/lfp_bigendian_setup.tar" | |
setup_image_name: ci_lfp_bigendian_setup | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup | |
run: |- | |
mkdir -p "$(dirname ${{ env.setup_image_path }})" | |
# the core functionality allowing us to build on whatever architecture | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
# - name: restore_cache | |
# uses: actions/[email protected] | |
# with: | |
# key: vers1-setup-image-{{ checksum "~/project/.circleci/images/setup/Dockerfile" }} | |
# path: "${{ env.setup_image_path }}" | |
- name: Assure setup image loaded locally | |
run: |- | |
if [ ! -f ${{ env.setup_image_path }} ]; then | |
echo "Local docker setup image not found. Recreating" | |
DOCKER_BUILDKIT=1 docker build -f .github/images/setup/Dockerfile -t ${{ env.setup_image_name }} --progress plain . | |
docker save ${{ env.setup_image_name }} > ${{ env.setup_image_path }} | |
else | |
echo "Local docker setup image found. Loading" | |
docker load -i ${{ env.setup_image_path }} | |
fi | |
- name: Build the image | |
run: |- | |
DOCKER_BUILDKIT=1 docker build -f .github/images/build/Dockerfile -t lfp --progress plain --build-arg image=${{ env.setup_image_name }} . | |
bigendian2: | |
name: Run tests on bigendian s390x system | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build | |
uses: docker/build-push-action@v4 | |
with: | |
builder: ${{ steps.buildx.outputs.name }} | |
context: . | |
file: .github/images/bigendian.Dockerfile | |
platforms: linux/s390x |