From 9a3a680215ef40ed35435fd87809cf4795e748df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCller?= Date: Sat, 25 Nov 2023 14:43:50 +0100 Subject: [PATCH] test --- .github/workflows/maintenance-linux.yml | 134 ++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 .github/workflows/maintenance-linux.yml diff --git a/.github/workflows/maintenance-linux.yml b/.github/workflows/maintenance-linux.yml new file mode 100644 index 000000000000..55a7aaa4ea9e --- /dev/null +++ b/.github/workflows/maintenance-linux.yml @@ -0,0 +1,134 @@ +name: Build Linux + +on: + push: + pull_request: + workflow_dispatch: + inputs: + crystal_version: + required: true + default: "master" + type: string + previous_crystal_version: + required: true + default: "1.10.1" + type: string + +env: + CRYSTAL_VERSION: "${{ inputs.crystal_version || 'master' }}" + CRYSTAL_SHA1: "${{ inputs.crystal_version || 'master' }}" + PREVIOUS_CRYSTAL_VERSION: "${{ inputs.previous_crystal_version || '1.10.1' }}" + +jobs: + build-linux: + name: Build x86 Linux tarballs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + repository: crystal-lang/distribution-scripts + + - name: Build linux binaries + working-directory: linux + run: make all #pull_images=true release=true + + # - name: Upload tarballs as artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: linux-${{ env.CRYSTAL_VERSION }} + # path: linux/build/*.gz + + - name: Upload tarball for use in the next step + uses: actions/upload-artifact@v3 + with: + name: tarball + path: | + linux/build/*.tar.gz + !linux/build/*-bundled.tar.gz + build-arrch64: + name: Build aarch64 Linux tarballs + runs-on: [linux, ARM64] + steps: + - uses: actions/checkout@v3 + repository: crystal-lang/distribution-scripts + + - name: Build linux binaries + working-directory: linux + run: make all #pull_images=true release=true + + # - name: Upload tarballs as artifacts + # uses: actions/upload-artifact@v3 + # with: + # name: linux-${{ env.CRYSTAL_VERSION }} + # path: linux/build/*.gz + + - name: Upload tarball for use in the next step + uses: actions/upload-artifact@v3 + with: + name: tarball + path: | + linux/build/*.tar.gz + !linux/build/*-bundled.tar.gz + + package-docker: + name: Build the docker images + runs-on: ubuntu-latest + needs: build-linux + env: + tag: "crystallang/crystal:${{ inputs.crystal_version || 'master' }}" + steps: + - name: Download the linux tarballs + uses: actions/download-artifact@v3 + with: + name: tarball + path: linux/build/ + + - run: ls linux/build/ + + - name: Build ubuntu runtime image + uses: docker/build-push-action@v5 + with: + target: runtime + file: docker/ubuntu.Dockerfile + build-contexts: tarball=linux/build/ + push: false + load: true + tags: "${{ env.tag }}" + + - name: Build ubuntu build image + uses: docker/build-push-action@v5 + with: + target: build + file: docker/ubuntu.Dockerfile + build-contexts: tarball=linux/build/ + push: false + load: true + tags: "${{ env.tag }}-build" + + - name: Build alpine runtime image + uses: docker/build-push-action@v5 + with: + target: runtime + file: docker/alpine.Dockerfile + build-contexts: tarball=linux/build/ + push: false + load: true + tags: "${{ env.tag }}-alpine" + + - name: Build alpine build image + uses: docker/build-push-action@v5 + with: + target: build + file: docker/alpine.Dockerfile + build-contexts: tarball=linux/build/ + push: false + load: true + tags: "${{ env.tag }}-alpine-build" + + - name: Inspect ubuntu + run: docker image inspect "${{ env.tag }}" + - name: Inspect ubuntu + run: docker image inspect "${{ env.tag }}-build" + - name: Inspect alpine + run: docker image inspect "${{ env.tag }}-alpine" + - name: Inspect alpine + run: docker image inspect "${{ env.tag }}-alpine-build"