Skip to content

Iso building

Iso building #1526

Workflow file for this run

name: Iso building
concurrency:
group: ci-${{ github.head_ref || github.ref }}-${{ github.repository }}
cancel-in-progress: true
on:
workflow_dispatch:
push:
paths:
- 'conf/**'
- 'specs/**'
- 'scripts/**'
- '.github/workflows/**'
branches: [ master, develop ]
pull_request:
paths:
- 'conf/**'
- 'specs/**'
- 'scripts/**'
- '.github/workflows/**'
branches: [ master, develop ]
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: "micro-dev"
# name: "Mocaccino Micro Development version"
- spec: "community"
name: "Mocaccino Community Desktop"
- spec: "gnome"
name: "Mocaccino GNOME Desktop"
- spec: "mate"
name: "Mocaccino MATE Desktop"
- spec: "kde"
name: "Mocaccino KDE Desktop"
- spec: "xfce"
name: "Mocaccino XFCE Desktop"
- spec: "minimal"
name: "Mocaccino Desktop Minimal"
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
# qemu:
# runs-on: ubuntu-latest
# needs: iso
# strategy:
# matrix:
# include:
# - spec: "minimal"
# flavor: "Minimal"
# steps:
# - uses: actions/checkout@v4
# - name: Download ISO
# uses: actions/download-artifact@v4
# with:
# name: mOS-${{ matrix.spec }}.iso.zip
# - name: Install deps
# run: |
# sudo apt-get update
# sudo apt-get install -y qemu qemu-system qemu-kvm
# sudo -E make deps
# sudo luet install -y utils/packer
# - name: Build QEMU Image 🔧
# run: |
# build=$(date +%Y%m%d)
# PACKER_ARGS="-var='accellerator=none' -var='sleep=5m' -var=build=$build -var='flavor=${{ matrix.flavor }}' -only qemu" make packer
# - uses: actions/upload-artifact@v4
# with:
# name: mOS-${{ matrix.spec }}.qcow
# path: |
# packer/*.tar.gz
vbox:
runs-on: macos-latest
needs: iso
strategy:
matrix:
include:
- spec: "minimal"
flavor: "Minimal"
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' -only virtualbox-iso -var=build=$build -var='flavor=${{ matrix.flavor }}'" make packer
ls packer
- uses: actions/upload-artifact@v4
with:
name: mOS-${{ matrix.spec }}.ova
path: |
packer/*.tar.gz
vbox-vagrant:
runs-on: macos-latest
needs: iso
strategy:
matrix:
include:
- spec: "minimal"
flavor: "Minimal"
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"
flavor: "Minimal"
steps:
- name: Install Go
uses: actions/setup-go@v2
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: iso
strategy:
matrix:
include:
- spec: "gnome"
name: "Mocaccino GNOME Desktop"
- spec: "mate"
name: "Mocaccino MATE Desktop"
- spec: "kde"
name: "Mocaccino KDE Desktop"
- spec: "xfce"
name: "Mocaccino XFCE Desktop"
- spec: "minimal"
name: "Mocaccino Minimal Desktop"
steps:
- uses: actions/checkout@v4
- name: Download ISO
uses: actions/download-artifact@v4
with:
name: mOS-${{ matrix.spec }}.iso.zip
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