Add automatic testing for live environment and installation #4
This file contains hidden or 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: Desktop ISO | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: archlinux:base-devel | |
| options: --privileged | |
| name: Build | |
| outputs: | |
| builddate: ${{ steps.date.outputs.builddate }} | |
| steps: | |
| - name: Get build date | |
| id: date | |
| run: | | |
| echo "builddate=$(date +'%y%m%d')" >> $GITHUB_OUTPUT | |
| - name: Clone CachyOS-Live-ISO | |
| id: clone | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Add CachyOS keyring | |
| id: keyring | |
| run: | | |
| pacman-key --init | |
| pacman-key --recv-keys F3B607488DB35A47 --keyserver keyserver.ubuntu.com | |
| pacman-key --lsign-key F3B607488DB35A47 | |
| - name: Install dependencies | |
| id: dependencies | |
| run: | | |
| sudo pacman -Syu --noconfirm archiso mkinitcpio-archiso squashfs-tools grub | |
| - name: Build ISO (${{ steps.date.outputs.builddate }}) | |
| id: build | |
| run: | | |
| ./buildiso.sh | |
| - name: Upload ISO to artifacts | |
| id: upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cachyos-desktop-linux-${{ steps.date.outputs.builddate }} | |
| path: out/desktop/* | |
| quicktest: | |
| name: Testing (${{ matrix.bootloader }} / ${{ matrix.filesystem }}) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| container: | |
| image: archlinux:base-devel | |
| options: --privileged | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 4 | |
| matrix: | |
| bootloader: [grub, systemd-boot, refind, limine] | |
| filesystem: [btrfs, xfs, ext4, f2fs, zfs] | |
| steps: | |
| - name: Clone CachyOS-Live-ISO | |
| id: clone | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| id: dependencies | |
| run: | | |
| pacman -Syu --noconfirm git ffmpeg imagemagick tesseract-data-eng qemu-desktop | |
| - name: Create build user | |
| id: user | |
| run: | | |
| useradd builder -m | |
| echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | |
| chmod -R a+rw . | |
| - name: Build quickemu | |
| id: quickemu | |
| run: | | |
| sudo -u builder git clone https://aur.archlinux.org/quickemu.git | |
| cd quickemu | |
| sudo -H -E -u builder makepkg --syncdeps --noconfirm | |
| pacman -U --noconfirm quickemu*.pkg.tar.zst | |
| cd .. | |
| - name: Clone quicktest | |
| id: clone-quicktest | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: 'quickemu-project/quicktest' | |
| path: 'quicktest' | |
| - name: Download ISO | |
| id: download | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: machines/cachyos-dailylive | |
| merge-multiple: true | |
| - name: Run quicktest | |
| id: quicktest | |
| run: | | |
| ./quicktest/quicktest test_install_calamares cachyos dailylive | |
| env: | |
| QT_NOTIFY: "false" | |
| QT_OPEN_RESULTS: "false" | |
| QT_QUICKGET_SKIP: "true" | |
| QT_TESTCASES_DIR: "./testcases" | |
| QUICKEMU_DISPLAY: "none" | |
| QUICKEMU_VM_DIR: "./machines" | |
| TEST_BOOTLOADER: "${{ matrix.bootloader }}" | |
| TEST_FILESYSTEM: "${{ matrix.filesystem }}" | |
| - name: Upload results to artifacts | |
| id: upload-results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cachyos-desktop-linux-results-${{needs.build.outputs.builddate}}-${{ matrix.bootloader }}-${{ matrix.filesystem }} | |
| path: results/* |