Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
Remove GH docker cache due to limited disk space
Browse files Browse the repository at this point in the history
  • Loading branch information
harmless-tech committed Apr 6, 2024
1 parent f0ad2a4 commit 4c65abb
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 70 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Space?
run: docker system prune --all
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -38,8 +40,7 @@ jobs:
with:
context: ./
file: ./docker/${{ matrix.target }}.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
no-cache: true
pull: true
push: false
load: true
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ amd64, arm64 ]
cross:
- aarch64-linux-gnu
- x86_64-linux-gnu
target:
- aarch64-unknown-linux-musl
- armv7-unknown-linux-musleabihf
- x86_64-unknown-linux-musl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Space?
run: docker system prune --all
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -39,14 +43,16 @@ jobs:
push: false
load: true
tags: ink-toolchain:dev
platforms: linux/${{ matrix.platform }}
build-args: |
CCONFIG=x86_64-linux-gnu---${{ matrix.cross }}
platforms: linux/amd64
builder: ${{ steps.buildx.outputs.name }}
- name: Extract
run: TARGETARCH='${{ matrix.platform }}' ./scripts/extract.sh
run: ./scripts/extract.sh
- name: Rename
shell: bash
working-directory: ./export
run: for f in *.tar.gz; do mv "$f" "${{ matrix.platform }}+$f"; done
run: for f in *.tar.gz; do mv "$f" "${{ matrix.cross }}+$f"; done
- name: Hash
shell: bash
working-directory: ./export
Expand All @@ -56,5 +62,6 @@ jobs:
with:
tag: ${{ github.ref_name }}
name: ${{ github.ref_name }}
prerelease: ${{ contains('-dev', github.ref_name) }}
allowUpdates: true
artifacts: "./export/*.tar.gz,./export/*.sha256"
29 changes: 29 additions & 0 deletions docker/aaa.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# syntax=docker/dockerfile:1
FROM debian:12-slim as builder

# Versioning
ARG CROSSTOOLNG_VERSION=crosstool-ng-1.26.0

# Do not set
ARG DEBIAN_FRONTEND=noninteractive
ARG TARGETARCH

ARG RUST_TARGET
ARG CROSS_TOOLCHAIN

RUN --mount=type=bind,source=./scripts/manage-apt.sh,target=/run.sh /run.sh

RUN --mount=type=bind,source=./scripts/build-crosstool.sh,target=/run.sh /run.sh

COPY ./config/${RUST_TARGET}.config /.config
ARG CCONFIG=""
COPY ./cconfig/${CCONFIG}.config /.cconfig
RUN --mount=type=bind,source=./scripts/build-cross.sh,target=/run.sh /run.sh

RUN --mount=type=bind,source=./scripts/package.sh,target=/run.sh /run.sh

FROM scratch

WORKDIR /export

COPY --from=builder /export/*.tar.gz .
64 changes: 0 additions & 64 deletions scripts/build-cross-old.sh

This file was deleted.

0 comments on commit 4c65abb

Please sign in to comment.