Skip to content

Commit

Permalink
Add ISO builds to CI: (#245)
Browse files Browse the repository at this point in the history
## Description

<!--- Please describe what this PR is going to change -->
This adds ISO builds to CI and releases. Remove deprecated CI directory.

## Why is this needed

<!--- Link to issue you have raised -->

Fixes: #

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->


## How are existing users impacted? What migration steps/scripts do we
need?

<!--- Fixes a bug, unblocks installation, removes a component of the
stack etc -->
<!--- Requires a DB migration script, etc. -->


## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
jacobweinstock authored Nov 13, 2024
2 parents fbb29ea + 7fdba3c commit ec44bea
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 253 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/build-all-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env: # Global environment, passed to all jobs & all steps
# To do so, set the secret DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD in the repo secrets, and set the below to yes.
LOGIN_TO_DOCKERHUB: "yes"

HOOK_VERSION: "0.9.1-build-${{github.run_number}}" # Use a forced Hook version
HOOK_VERSION: "0.9.2-build-${{github.run_number}}" # Use a forced Hook version

# Which flavors to build? space separated list, must match one of the TAG='s in flavors (this is used by matrix_prep job in gha-matrix command)
CI_TAGS: "standard armbian-sbc armbian-uefi lts" # 'dev' is not included
Expand Down Expand Up @@ -165,11 +165,19 @@ jobs:
DO_BUILD_LK_CONTAINERS: "no" # already built them; this is only for hook/linuxkit.
run: bash build.sh build "${{ matrix.kernel }}"

- name: "Build Hook ISO with Kernel ${{matrix.kernel}} (${{ matrix.arch }}) - cache: ${{matrix.gha_cache}}"
if: ${{ matrix.kernel == 'hook-latest-lts-amd64' || matrix.kernel == 'hook-default-amd64' || matrix.kernel == 'hook-latest-lts-arm64' || matrix.kernel == 'hook-default-arm64' }}
env:
DO_BUILD_LK_CONTAINERS: "no" # already built them; this is only for hook/linuxkit.
run: bash build.sh build "${{ matrix.kernel }}" LINUXKIT_ISO=yes

- name: Upload deb as artifact ${{ matrix.arch.name }} ${{ matrix.distro }}
uses: actions/upload-artifact@v4
with:
name: "hook-tarball-${{ matrix.kernel }}"
path: out/*.tar.gz
path: |
out/*.tar.gz
out/*.iso
release-latest:
name: Publish all Hooks to GitHub Releases
Expand Down Expand Up @@ -226,7 +234,9 @@ jobs:
uses: jmgilman/actions-generate-checksum@v1
with:
method: sha512
patterns: "*.tar.gz"
patterns: |
"*.tar.gz"
"*.iso"
- name: Update latest release
uses: softprops/action-gh-release@v2
Expand All @@ -235,6 +245,7 @@ jobs:
body: ${{env.RELEASE_NOTES}}
files: |
*.tar.gz
*.iso
checksum.txt
prerelease: true
tag_name: latest
Expand Down Expand Up @@ -270,7 +281,9 @@ jobs:
uses: jmgilman/actions-generate-checksum@v1
with:
method: sha512
patterns: "*.tar.gz"
patterns: |
"*.tar.gz"
"*.iso"
- name: Update tag release
uses: softprops/action-gh-release@v2
Expand All @@ -279,6 +292,7 @@ jobs:
body: ${{env.RELEASE_NOTES}}
files: |
*.tar.gz
*.iso
checksum.txt
prerelease: true
tag_name: ${{github.ref}}
162 changes: 0 additions & 162 deletions .github/workflows/deprecated/ci.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/deprecated/formatters-and-linters.sh

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/deprecated/kernel-ci.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/deprecated/kernel-push.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion bash/linuxkit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function linuxkit_build() {
"--docker"
"--arch" "${kernel_info['DOCKER_ARCH']}"
"--format" "iso-efi-initrd"
"--name" "hook"
"--name" "hook-${OUTPUT_ID}"
"--cache" "${lk_cache_dir}"
"--dir" "${lk_iso_output_dir}"
"hook.${inventory_id}.yaml" # the linuxkit configuration file
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ else # otherwise default to tty, but allow override
fi

# Set the default HOOK_VERSION; override with env var; -x exports it for envsubst later
declare -g -r -x HOOK_VERSION="${HOOK_VERSION:-"0.9.1"}"
declare -g -r -x HOOK_VERSION="${HOOK_VERSION:-"0.9.2"}"
log info "Using Hook version (HOOK_VERSION): ${HOOK_VERSION}"

### Inventory
Expand Down

0 comments on commit ec44bea

Please sign in to comment.