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

feat: switch to Github managed M1 runners that are in beta now #13

Merged
merged 5 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ on:

jobs:
prebuild:
# There are currently no Github managed Apple Silicon runners available:
# https://github.com/actions/runner-images/issues/2187
#
# HashiCorp manages their own Apple Silicon runners for Github but they
# are only available to non-public repositories, hence we maintain a
# private mirror of this repository to build for Apple Silicon. To keep
# things simple, we run the entire CI from that mirror.
if: github.repository == 'cdktf/node-pty-prebuilt-multiarch-private'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -55,33 +47,35 @@ jobs:

- name: debian-x86_64
os: ubuntu-latest
BASE_IMAGE: library/debian:9.6-slim
BASE_IMAGE: library/debian:11.7-slim
DOCKERFILE: Dockerfile.debian
QEMU_ARCH: x86_64

- name: debian-i386
os: ubuntu-latest
BASE_IMAGE: i386/debian:9.6-slim
BASE_IMAGE: i386/debian:11.7-slim
DOCKERFILE: Dockerfile.debian
QEMU_ARCH: i386

- name: debian-arm32v6
os: ubuntu-latest
BASE_IMAGE: balenalib/raspberry-pi-debian:stretch
BASE_IMAGE: balenalib/raspberry-pi-debian:bullseye
DOCKERFILE: Dockerfile.debian
QEMU_ARCH: arm

- name: debian-arm64v8
os: ubuntu-latest
BASE_IMAGE: arm64v8/debian:9.6-slim
BASE_IMAGE: arm64v8/debian:11.7-slim
DOCKERFILE: Dockerfile.debian
QEMU_ARCH: aarch64

- name: darwin-x86_64
os: macOS-latest

- name: darwin-arm64
os: ['self-hosted', 'macOS', 'ARM64']
# xlarge is arm64
# https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners#about-macos-larger-runners
os: macos-13-xlarge

- name: windows-x86_64
os: windows-2022
Expand Down
4 changes: 2 additions & 2 deletions .prebuild/Dockerfile.debian
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE:-library/debian:9.6-slim}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

FROM ${BASE_IMAGE:-library/debian:11.7-slim}

ARG QEMU_ARCH
ENV QEMU_ARCH=${QEMU_ARCH:-x86_64}

COPY .prebuild/qemu/qemu-${QEMU_ARCH}-static /usr/bin/

RUN apt-get update \
&& apt-get install -y gcc g++ make python curl

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

&& apt-get install -y gcc g++ make python3 curl

RUN [ "$(uname -m)" = "x86_64" ] && apt-get install -y g++-multilib gcc-multilib || echo "ok"

Expand Down
5 changes: 5 additions & 0 deletions .prebuild/qemu/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Source: https://github.com/NorthernMan54/node-pty-prebuilt-multiarch/blob/401d14756196d24dabeadc7b55cff28dfea68d4d/.prebuild/qemu/README.md

These are copied from https://github.com/multiarch/qemu-user-static/releases/

Current release - qemu-*-static @ 7.2.0-1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

Binary file modified .prebuild/qemu/qemu-aarch64-static
Binary file not shown.
Binary file modified .prebuild/qemu/qemu-arm-static
Binary file not shown.
Binary file modified .prebuild/qemu/qemu-i386-static
Binary file not shown.
Binary file modified .prebuild/qemu/qemu-x86_64-static
Binary file not shown.
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ export DOCKERFILE="Dockerfile.debian"
docker build -f .prebuild/$DOCKERFILE --build-arg BASE_IMAGE=${BASE_IMAGE} --build-arg QEMU_ARCH=${QEMU_ARCH} -t multiarch-build .
docker run --rm -v $(pwd):/node-pty multiarch-build

export BASE_IMAGE=library/debian:9.6-slim

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

export BASE_IMAGE=library/debian:11.7-slim
export QEMU_ARCH=x86_64
export DOCKERFILE="Dockerfile.debian"
docker build -f .prebuild/$DOCKERFILE --build-arg BASE_IMAGE=${BASE_IMAGE} --build-arg QEMU_ARCH=${QEMU_ARCH} -t multiarch-build .
docker run --rm -v $(pwd):/node-pty multiarch-build

export BASE_IMAGE=i386/debian:9.6-slim

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

export BASE_IMAGE=i386/debian:11.7-slim
export QEMU_ARCH=i386

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

export DOCKERFILE="Dockerfile.debian"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

docker build -f .prebuild/$DOCKERFILE --build-arg BASE_IMAGE=${BASE_IMAGE} --build-arg QEMU_ARCH=${QEMU_ARCH} -t multiarch-build .
docker run --rm -v $(pwd):/node-pty multiarch-build

export BASE_IMAGE=arm64v8/debian:9.6-slim

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

export BASE_IMAGE=arm64v8/debian:11.7-slim
export QEMU_ARCH=aarch64

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

export DOCKERFILE="Dockerfile.debian"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.github/workflows/release.yml

docker build -f .prebuild/$DOCKERFILE --build-arg BASE_IMAGE=${BASE_IMAGE} --build-arg QEMU_ARCH=${QEMU_ARCH} -t multiarch-build .
Expand Down
Loading