This repository has been archived by the owner on Jan 25, 2024. It is now read-only.
Testing builds #118
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: Testing builds | |
on: | |
schedule: | |
- cron: "0 3 * * *" # run at the start of every day after functions.py is updated | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-ubuntu: | |
strategy: | |
matrix: | |
version: [ "22.04", "23.10" ] | |
de_name: [ "gnome", "kde", "xfce", "lxqt", "budgie", "deepin", "cinnamon", "cli" ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximizing build space | |
uses: easimon/maximize-build-space@master | |
with: | |
temp-reserve-mb: 11264 | |
swap-size-mb: 1 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: Checking out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Installing dependencies | |
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted | |
- name: Copy testing script to root | |
run: cp ./.github/scripts/build-image.py ./build-image.py | |
- name: Testing Ubuntu builds | |
run: sudo python3 ./build-image.py ubuntu ${{ matrix.version }} ${{ matrix.de_name }} | |
- name: Uploading result as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results_ubuntu_${{ matrix.version }}_${{ matrix.de_name }} | |
retention-days: 1 | |
path: | | |
*_results.txt | |
test-arch: | |
strategy: | |
matrix: | |
de_name: [ "gnome", "kde", "xfce", "lxqt", "budgie", "deepin", "cinnamon", "cli" ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximizing build space | |
uses: easimon/maximize-build-space@master | |
with: | |
temp-reserve-mb: 11264 | |
swap-size-mb: 1 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: Checking out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Installing dependencies | |
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted | |
- name: Copy testing script to root | |
run: cp ./.github/scripts/build-image.py ./build-image.py | |
- name: Testing Arch builds | |
run: sudo python3 ./build-image.py arch latest ${{ matrix.de_name }} | |
- name: Uploading result as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results_arch_latest_${{ matrix.de_name }} | |
retention-days: 1 | |
path: | | |
*_results.txt | |
test-fedora: | |
strategy: | |
matrix: | |
version: [ "39", "40" ] | |
de_name: [ "gnome", "kde", "xfce", "lxqt", "deepin", "budgie", "cinnamon", "cli" ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximizing build space | |
uses: easimon/maximize-build-space@master | |
with: | |
temp-reserve-mb: 11264 | |
swap-size-mb: 1 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: Checking out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Installing dependencies | |
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted | |
- name: Copy testing script to root | |
run: cp ./.github/scripts/build-image.py ./build-image.py | |
- name: Testing Fedora builds | |
run: sudo python3 ./build-image.py fedora ${{ matrix.version }} ${{ matrix.de_name }} | |
- name: Uploading result as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results_fedora_${{ matrix.version }}_${{ matrix.de_name }} | |
retention-days: 1 | |
path: | | |
*_results.txt | |
test-debian: | |
strategy: | |
matrix: | |
de_name: [ "gnome", "kde", "xfce", "lxqt", "budgie", "cinnamon", "cli" ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Maximizing build space | |
uses: easimon/maximize-build-space@master | |
with: | |
temp-reserve-mb: 11264 | |
swap-size-mb: 1 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: Checking out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Installing dependencies | |
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted | |
- name: Copy testing script to root | |
run: cp ./.github/scripts/build-image.py ./build-image.py | |
- name: Testing Debian builds | |
run: sudo python3 ./build-image.py debian stable ${{ matrix.de_name }} | |
- name: Uploading result as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results_debian_stable_${{ matrix.de_name }} | |
retention-days: 1 | |
path: | | |
*_results.txt | |
test-pop-os: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Installing dependencies | |
run: sudo apt-get update && sudo apt-get install -y cgpt vboot-kernel-utils parted | |
- name: Copy testing script to root | |
run: cp ./.github/scripts/build-image.py ./build-image.py | |
- name: Testing PopOS build | |
run: sudo python3 ./build-image.py pop-os 22.04 cosmic-gnome | |
- name: Uploading result as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: results_pop-os_22.04_cosmic-gnome | |
retention-days: 1 | |
path: | | |
*_results.txt | |
evaluate-results: | |
needs: [ test-ubuntu, test-arch, test-fedora, test-pop-os, test-debian ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out repository code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Downloading result artifacts | |
uses: actions/download-artifact@v3 | |
- name: Combining sizes into one json file | |
run: python3 ./.github/scripts/combine_sizes.py | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
# Disable setting repo owner as commit author | |
commit_user_name: github-actions[bot] | |
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com | |
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
# Optional. Commit message for the created commit. | |
# Defaults to "Apply automatic changes" | |
commit_message: "chore: update os_sizes.json" | |
# Optional glob pattern of files which should be added to the commit | |
# Defaults to all (.) | |
# See the `pathspec`-documentation for git | |
# - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203 | |
# - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec | |
file_pattern: 'os_sizes.json' | |
- name: Evaluating results | |
# Check if the results are not empty and fail the whole workflow if they are | |
run: | | |
for file in ./results_*/*_results.txt | |
do | |
if [ "$(cat $file)" == "0" ] | |
then | |
echo $file >> ./failed_results.txt | |
fi | |
done | |
if [ -s ./failed_results.txt ] | |
then | |
echo "Failed to build the following images:" | |
cat ./failed_results.txt | |
exit 1 | |
fi |