mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 10:25:25 +01:00
Now that GH actions supports jobs up to 6 hours long we don't need to do multi-stage builds anymore.
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
name: Run under bubblewrap
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: Run under bubblewrap
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Install bubblewrap
|
|
run: sudo apt-get install bubblewrap
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
# There is a strange bug(?) in nongnu, when you clone a git repository
|
|
# against a commit != HEAD with depth=1, it errors out.
|
|
fetch-depth: 0
|
|
- name: Work around Ubuntu 24.04 bubblewrap bug
|
|
run: sudo cp .github/workflows/bwrap.apparmor /etc/apparmor.d/bwrap && sudo systemctl reload apparmor
|
|
- name: Query cache for sources
|
|
id: cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: |
|
|
mirror
|
|
mirror-state
|
|
key: cache-${{ hashFiles('steps/*/sources') }}
|
|
restore-keys: |
|
|
cache-
|
|
- name: Get sources
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: mkdir -p mirror mirror-state && ./mirror.sh mirror mirror-state
|
|
- name: Cache sources
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: |
|
|
mirror
|
|
mirror-state
|
|
key: cache-${{ hashFiles('steps/*/sources') }}
|
|
- name: Run bootstrap
|
|
run: ./rootfs.py --bwrap --external-sources --build-kernels --cores 2 --mirror file://${PWD}/mirror
|
|
- name: Archive created packages
|
|
if: always() # archive both failed and successful builds
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: packages
|
|
path: target/external/repo/**
|