Labs ISO building #1331
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
name: Labs ISO building | |
concurrency: | |
group: ci-dev-${{ github.head_ref || github.ref }}-${{ github.repository }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'conf/**' | |
- 'specs/**' | |
- 'scripts/**' | |
- '.github/workflows/**' | |
- 'Makefile' | |
- 'tests/**' | |
pull_request: | |
paths: | |
- 'conf/**' | |
- 'specs/**' | |
- 'scripts/**' | |
- '.github/workflows/**' | |
- 'tests/**' | |
- 'Makefile' | |
schedule: | |
- cron: '0 1 * * *' | |
create: | |
tags: | |
- v* | |
jobs: | |
iso: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# - spec: "micro" | |
# name: "Mocaccino Micro" | |
- spec: "fynedesk-dev" | |
name: "Mocaccino Fynedesk Development version" | |
- spec: "cosmic-dev" | |
name: "Mocaccino Cosmic Development version" | |
# - spec: "maui-dev" | |
# name: "Mocaccino Maui Development version" | |
# - spec: "micro-dev" | |
# name: "Mocaccino Micro Development version" | |
- spec: "mate-dev" | |
name: "Mocaccino MATE Desktop Development version" | |
- spec: "gnome-dev" | |
name: "Mocaccino GNOME Desktop Development version" | |
- spec: "kde-dev" | |
name: "Mocaccino KDE Desktop Development version" | |
- spec: "xfce-dev" | |
name: "Mocaccino XFCE Desktop Development version" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: fkirc/skip-duplicate-actions@master | |
- name: Install Luet and deps 🔧 | |
run: | | |
sudo apt-get install -y xorriso squashfs-tools dosfstools | |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh | |
sudo luet install -y repository/mocaccino-extra | |
sudo luet install -y utils/jq utils/yq extension/makeiso | |
- name: ${{matrix.name}} ISO Build 🔧 | |
env: | |
LUET_NOLOCK: "true" | |
LUET_CONFIG_PROTECT_SKIP: "true" | |
SPEC: ${{matrix.spec}} | |
run: | | |
sudo -E HTTP_TIMEOUT="900" luet-makeiso specs/$SPEC.yaml | |
mkdir isobuild | |
mv *.iso *.sha256 isobuild/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mOS-${{ matrix.spec }}.iso.zip | |
path: | | |
isobuild/*.iso | |
isobuild/*.sha256 | |
test-iso: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- spec: "minimal-dev" | |
name: "Mocaccino Desktop Minimal Development version" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: fkirc/skip-duplicate-actions@master | |
- name: Install Luet and deps 🔧 | |
run: | | |
sudo apt-get install -y xorriso squashfs-tools dosfstools | |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh | |
sudo luet install -y repository/mocaccino-extra | |
sudo luet install -y utils/jq utils/yq extension/makeiso | |
- name: ${{matrix.name}} ISO Build 🔧 | |
env: | |
LUET_NOLOCK: "true" | |
LUET_CONFIG_PROTECT_SKIP: "true" | |
SPEC: ${{matrix.spec}} | |
run: | | |
sudo -E HTTP_TIMEOUT="900" luet-makeiso specs/$SPEC.yaml | |
mkdir isobuild | |
mv *.iso *.sha256 isobuild/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mOS-${{ matrix.spec }}.iso.zip | |
path: | | |
isobuild/*.iso | |
isobuild/*.sha256 | |
vbox-vagrant: | |
runs-on: macos-15 | |
needs: test-iso | |
strategy: | |
matrix: | |
include: | |
- spec: "minimal-dev" | |
flavor: "Minimal-dev" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download ISO | |
uses: actions/download-artifact@v4 | |
with: | |
name: mOS-${{ matrix.spec }}.iso.zip | |
- name: Install deps | |
run: | | |
brew tap hashicorp/tap | |
brew install hashicorp/tap/packer | |
- name: Build VBox Image 🔧 | |
run: | | |
packer plugins install github.com/hashicorp/virtualbox | |
packer plugins install github.com/hashicorp/vagrant | |
build=$(date +%Y%m%d) | |
PACKER_ARGS="-var='sleep=5m' -var='vagrant=true' -var=build=$build -var='flavor=${{ matrix.flavor }}' -only virtualbox-iso" make packer | |
ls packer | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mOS-${{ matrix.spec }}.box | |
path: | | |
packer/*.box | |
tests: | |
runs-on: macos-latest | |
needs: vbox-vagrant | |
strategy: | |
matrix: | |
include: | |
- spec: "minimal-dev" | |
flavor: "Minimal-dev" | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.16' | |
- uses: actions/checkout@v4 | |
- name: Download vagrant box | |
uses: actions/download-artifact@v4 | |
with: | |
name: mOS-${{ matrix.spec }}.box | |
path: packer | |
- name: Run tests 🔧 | |
run: | | |
go install -mod=mod github.com/onsi/ginkgo/v2/[email protected] | |
make test | |
# release: | |
# if: startsWith(github.ref, 'refs/tags/') | |
# runs-on: ubuntu-latest | |
# needs: tests | |
# strategy: | |
# matrix: | |
# include: | |
# - spec: "micro" | |
# name: "Mocaccino Micro" | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Download ISO | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: mOS-${{ matrix.spec }}.iso.zip | |
# path: release | |
# - name: Download vagrant box | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: mOS-${{ matrix.spec }}.box | |
# path: release | |
# - name: Download vagrant box | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: mOS-${{ matrix.spec }}.ova | |
# path: release | |
# - name: Download vagrant box | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: mOS-${{ matrix.spec }}.qcow | |
# path: release | |
# - name: Release | |
# uses: fnkr/github-action-ghr@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# env: | |
# GHR_PATH: release/ | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# GHR_COMPRESS: xz |