-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub actions workflow to build release ISOs
Related to #134 Add a GitHub actions workflow to build release ISOs for intel desktop. * **New GitHub Actions Workflow:** - Add `release-isos.yml` to `.github/workflows/` to build release ISOs. - Trigger on push and pull_request events for `master`, `next`, `stable`, and `staging` branches. - Include steps to build the `intel/desktop` configuration, create an ISO image, and upload the ISO as a GitHub artifact. * **Build ISO Script:** - Add `configs/intel/desktop/scripts/build_iso.sh` to create an ISO image using `mkisofs`. - Save the ISO to the specified output path. * **Makefile Changes:** - Add a new target `isoimage` in `configs/intel/desktop/extensions/Makefile` to call the `build_iso.sh` script. * **Documentation Update:** - Update `configs/intel/desktop/README.md` to include instructions for building an ISO. * **Build Image Script:** - Modify `configs/intel/desktop/scripts/build_image.sh` to create an ISO image instead of a sparse image.
- Loading branch information
Showing
5 changed files
with
110 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Release ISOs | ||
|
||
on: | ||
push: | ||
branches: [master, next, stable, staging] | ||
pull_request: | ||
branches: [master, next, stable, staging] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
'SKIFF_WORKSPACE': intel-desktop | ||
'SKIFF_CONFIG': intel/desktop,skiff/core | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Update the submodule | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
git submodule update --init --recursive | ||
- name: Cache build cache and downloads | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/br-cache/ | ||
key: buildroot-r1-h${{ hashFiles('buildroot/Makefile') }}-ubuntu-latest | ||
restore-keys: | | ||
buildroot-r1 | ||
- name: Install buildroot apt deps | ||
run: | | ||
sudo apt-get install -y libelf-dev python3-magic python3-flake8 | ||
- name: Print help and packages list | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
make help | ||
- name: Enable using a pre-built toolchain | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
echo "BR2_TOOLCHAIN_EXTERNAL=y" > ./overrides/buildroot/toolchain | ||
- name: Compile the OS | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
export TERM=xterm | ||
export BR2_CCACHE_DIR=${HOME}/br-cache/ccache | ||
export BR2_DL_DIR=${HOME}/br-cache/dl | ||
make -s configure compile check | ||
- name: Create an ISO image | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
make cmd/intel/desktop/buildiso | ||
mkdir -p workflow-artifacts | ||
mv ./intel-desktop-image.iso ./workflow-artifacts/intel-desktop-image.iso | ||
- name: Upload ISO image artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: intel-desktop-image.iso | ||
path: ${{ github.workspace }}/workflow-artifacts/intel-desktop-image.iso |
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
if [ $EUID != 0 ]; then | ||
echo "This script requires sudo, so it might not work." | ||
fi | ||
|
||
set -e | ||
|
||
if [ -z "$INTEL_DESKTOP_IMAGE" ]; then | ||
echo "Please set INTEL_DESKTOP_IMAGE to the path to the output image." | ||
exit 1 | ||
fi | ||
|
||
if [[ "$INTEL_DESKTOP_IMAGE" != /* ]]; then | ||
# the "make" command is run from the skiff root, | ||
# it's most intuitive to take that as the base path | ||
INTEL_DESKTOP_IMAGE=$SKIFF_ROOT_DIR/$INTEL_DESKTOP_IMAGE | ||
fi | ||
|
||
echo "Creating ISO image..." | ||
mkisofs -o $INTEL_DESKTOP_IMAGE.iso -b boot/grub/i386-pc/eltorito.img -c boot.catalog -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "SkiffOS" $SKIFF_CURRENT_CONF_DIR/resources | ||
|
||
echo "ISO image created at $INTEL_DESKTOP_IMAGE.iso" |