Skip to content
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
29 changes: 29 additions & 0 deletions .github/actions/cleanup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Free up space in the runner
runs:
using: "composite"
steps:
- name: Free up space
shell: bash
run: |
df -h
echo
echo Freeing up space
rm -rf .git/
docker system prune --force
docker rmi $(docker image ls -aq) || true
docker system prune --force
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get autoremove -y
sudo apt-get autoclean -y
sudo rm -rf /usr/lib/jvm
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/share/swift
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/julia*
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /opt/microsoft /opt/google
sudo rm -rf /opt/az
sudo rm -rf /usr/local/share/powershell
echo
df -h
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,8 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Free up space
if: ${{ matrix.target == 'qt' }}
uses: ./.github/actions/cleanup
- name: Build and push toolchain
run: ./scripts/build -p -g -s ${{ matrix.target }}
13 changes: 8 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
echo "UUID=$UUID" >> "$GITHUB_OUTPUT"
docker image save ghcr.io/toltec-dev/toolchain | gzip > ${{ runner.temp }}/$UUID-toolchain.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4
with:
name: ${{ env.UUID }}-toolchain
path: ${{ runner.temp }}/${{ env.UUID }}-toolchain.tar.gz
Expand Down Expand Up @@ -70,14 +70,14 @@ jobs:
run: |
pushd ${{ runner.temp }}
tar xf ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz
rm ${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz
popd
rm ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-toolchain.tar.gz
- name: Build and push toolchain
run: ./scripts/build -g -s base -c ghcr.io/toltec-dev/toolchain=oci-layout://${{ runner.temp }}
- name: Export the container
run: docker image save ghcr.io/toltec-dev/base | gzip > ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4
with:
name: ${{ needs.stage1.outputs.UUID }}-base
path: ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-base.tar.gz
Expand Down Expand Up @@ -111,14 +111,17 @@ jobs:
run: |
pushd ${{ runner.temp }}
tar xf ${{ needs.stage2.outputs.UUID }}-base.tar.gz
rm ${{ needs.stage2.outputs.UUID }}-base.tar.gz
popd
rm ${{ runner.temp }}/${{ needs.stage2.outputs.UUID }}-base.tar.gz
- name: Free up space
if: ${{ matrix.target == 'qt' }}
uses: ./.github/actions/cleanup
- name: Build and push toolchain
run: ./scripts/build -g -s ${{ matrix.target }} -c ghcr.io/toltec-dev/base=oci-layout://${{ runner.temp }}
- name: Export the container
run: docker image save ghcr.io/toltec-dev/${{ matrix.target }} | gzip > ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-${{ matrix.target }}.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4
with:
name: ${{ needs.stage1.outputs.UUID }}-${{ matrix.target }}
path: ${{ runner.temp }}/${{ needs.stage1.outputs.UUID }}-${{ matrix.target }}.tar.gz
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: release
on:
push:
tags:
- '*'
- "*"
jobs:
stage1:
name: Stage 1
Expand Down Expand Up @@ -65,6 +65,9 @@ jobs:
run: |
VERSION="$(echo "${{ github.ref }}" | cut -d / -f 3)"
echo "version=$VERSION" >> "$GITHUB_ENV"
- name: Free up space
if: ${{ matrix.target == 'qt' }}
uses: ./.github/actions/cleanup
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push toolchain
Expand Down
Loading