Fix bubblewrap support & CI workflows after simplify #235
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2023 fosslinux <[email protected]> | |
# | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
name: Run under bubblewrap | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
pass1: | |
name: Run up to Linux build under bubblewrap | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install bubblewrap | |
run: sudo apt install bubblewrap | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
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: Query cache for sources | |
id: cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
tmp/externals/distfiles | |
key: cache-${{ hashFiles('steps/*/sources') }} | |
- name: Get sources | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: ./download-distfiles.sh | |
- name: Cache sources | |
if: steps.cache.outputs.cache-hit != 'true' | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
tmp/externals/distfiles | |
key: cache-${{ hashFiles('steps/*/sources') }} | |
- name: Run bootstrap | |
run: ./rootfs.py --bwrap --external-sources --build-kernels --preserve --cores 2 --internal-ci pass1 | |
- name: Archive created packages | |
if: failure() # archive failed builds progress | |
uses: actions/upload-artifact@v3 | |
with: | |
name: packages | |
path: tmp/external/repo/** | |
- name: Tar pass1 image | |
run: tar -cf pass1_image.tar tmp | |
- name: Archive pass1_image | |
uses: actions/upload-artifact@v3 | |
with: | |
name: internal_pass1_image | |
path: pass1_image.tar | |
pass2: | |
name: Run up to Python bootstrap under bubblewrap | |
needs: pass1 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install bubblewrap | |
run: sudo apt install bubblewrap | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
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: Get pass1_image | |
uses: actions/download-artifact@v3 | |
with: | |
name: internal_pass1_image | |
- name: Extract pass1_image | |
run: tar -xf pass1_image.tar | |
- name: Query cache for sources | |
id: cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
externals/distfiles | |
key: cache-${{ hashFiles('steps/*/sources') }} | |
- name: Get sources | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: ./download-distfiles.sh | |
- name: Cache sources | |
if: steps.cache.outputs.cache-hit != 'true' | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
externals/distfiles | |
key: cache-${{ hashFiles('steps/*/sources') }} | |
- name: Run bootstrap | |
run: ./rootfs.py --bwrap --external-sources --build-kernels --preserve --cores 2 --internal-ci pass2 | |
- name: Archive created packages | |
if: always() # archive failed builds progress | |
uses: actions/upload-artifact@v3 | |
with: | |
name: internal_packages_pass2 | |
path: tmp/externals/repo/** | |
pass3: | |
name: Run remaining builds under bubblewrap | |
needs: pass2 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install bubblewrap | |
run: sudo apt install bubblewrap | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
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: Get pass1_image | |
uses: actions/download-artifact@v3 | |
with: | |
name: internal_pass1_image | |
- name: Extract pass1_image | |
run: tar -xf pass1_image.tar | |
# By doing this, all packages that have already been compiled will come from the preseed. | |
- name: Get packages repo progress | |
uses: actions/download-artifact@v3 | |
with: | |
name: internal_packages_pass2 | |
path: tmp/externals/repo-preseeded/ | |
- name: Query cache for sources | |
id: cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
externals/distfiles | |
key: cache-${{ hashFiles('steps/*/sources') }} | |
- name: Get sources | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: ./download-distfiles.sh | |
- name: Cache sources | |
if: steps.cache.outputs.cache-hit != 'true' | |
uses: actions/cache/save@v3 | |
with: | |
path: | | |
externals/distfiles | |
key: cache-${{ hashFiles('steps/*/sources') }} | |
- name: Run bootstrap | |
run: ./rootfs.py --bwrap --external-sources --build-kernels --preserve --cores 2 --internal-ci pass3 | |
- name: Archive created packages | |
if: always() # archive failed builds | |
uses: actions/upload-artifact@v3 | |
with: | |
name: packages | |
path: tmp/externals/repo/** |