SerenityOS Build (No Ports) #170
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
# This is a basic workflow to help you get started with Actions | |
name: SerenityOS Build (No Ports) | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
SerenityOS_Build_No_Ports: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-22.04 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
# Runs a single command using the runners shell | |
- name: Updating System | |
run: sudo apt update && sudo apt full-upgrade -y | |
- name: Installing Dependencies | |
run: sudo apt install zip build-essential neofetch figlet lolcat cmake ccache libboost-dev curl libmpfr-dev libmpc-dev libgmp-dev e2fsprogs ninja-build qemu-system-gui qemu-system-x86 qemu-utils ccache rsync unzip texinfo gcc-12 g++-12 gcc-11 g++-11 git -y | |
- name: System Information:Neofetch | |
run: neofetch | |
- name: Cloning SerenityOS | |
run: | | |
cd ~ | |
mkdir SerenityOS | |
cd SerenityOS | |
git clone https://github.com/SerenityOS/serenity | |
cd serenity | |
- name: Setup ccache | |
run: | | |
sudo /usr/sbin/update-ccache-symlinks | |
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc | |
export PATH="/usr/lib/ccache/:$PATH" | |
source ~/.bashrc && echo $PATH | |
which g++ gcc | |
ccache -M 5000M | |
ccache -s | |
- name: Parsing Commit ID and DATE | |
run: | | |
cd ~/SerenityOS/serenity | |
HEAD=$(git rev-parse --short HEAD) && DATE=$(date) | |
echo $HEAD | |
echo $DATE | |
- name: Preparing to Building | |
run: | | |
cd ~/SerenityOS/serenity | |
sudo cp * -rfv /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts | |
- name: Building ToolChain | |
run: | | |
cd /home/runner/work/SerenityOS-Images-NoPorts/ | |
sudo chmod 777 SerenityOS-Images-NoPorts | |
cd /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/ | |
sudo chmod -R 777 * | |
ls | |
/home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Meta/serenity.sh rebuild-toolchain | |
- name: Ccache Status After Build ToolChain | |
run: ccache -s | |
- name: Building SerenityOS and updating Date of Build | |
run: | | |
/home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Meta/serenity.sh build | |
DATE=$(date) | |
echo $DATE | |
- name: Ccache Status After Build SerenityOS | |
run: ccache -s | |
- name: Building GRUB Disk Image | |
run: | | |
cd /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64 | |
ninja grub-image | |
- name: Converting GRUB Disk Image to VirtualBox/vmWare Images | |
run: | | |
qemu-img convert -O vdi /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/grub_disk_image /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/serenityos.vdi | |
qemu-img convert -O vmdk /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/grub_disk_image /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/serenityos.vmdk | |
- name: Images to ZIP | |
run: | | |
cd /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64 | |
mkdir ZIPBUILD | |
cd ZIPBUILD | |
DATE=$(date +%d-%m-%Y-%H-%M-%S) | |
cd ~/SerenityOS/serenity | |
HEAD=$(git rev-parse --short HEAD) | |
cd /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/ZIPBUILD | |
zip "SerenityOS_Build_NoPorts_$DATE,$HEAD".zip /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/serenityos.vmdk /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/serenityos.vdi | |
ls | |
- name: Preparing for Upload | |
run: | | |
cd /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/ | |
ls | |
mkdir Artifact | |
cd ZIPBUILD | |
ls | |
sudo cp * /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/Artifact/ | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
# Artifact name | |
name: SerenityOS_Build(NoPorts) | |
# A file, directory or wildcard pattern that describes what to upload | |
path: /home/runner/work/SerenityOS-Images-NoPorts/SerenityOS-Images-NoPorts/Build/x86_64/Artifact | |