-
-
Notifications
You must be signed in to change notification settings - Fork 118
Bump deps and add CI #396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Bump deps and add CI #396
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
09272f5
m1n1: bump to v1.5.2
chadmed 35438b0
build: bump python to 3.13.9
chadmed 8f7ebc8
build: bump libffi to 3.5.2
chadmed 0c5528a
workflows: build: add build CI workflow
chadmed 37d2d7c
workflows: add main release workflow
chadmed 930675d
workflows: release-prod: add prod release workflow
chadmed b511abb
workflows: release-dev: add dev release workflow
chadmed e4b7e6e
push.sh: drop
chadmed 537573f
README: clean up formatting
chadmed ea5ba08
README: explain CI pipelines
chadmed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: build | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
| workflow_call: | ||
| outputs: | ||
| installer_ver: | ||
| description: asahi-installer built version string | ||
| value: ${{ jobs.build.outputs.installer_ver }} | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| installer_ver: ${{ steps.compile.outputs.installer_ver }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| fetch-tags: true | ||
| submodules: recursive | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install --no-install-recommends -y gcc-aarch64-linux-gnu | ||
| sudo apt-get install --no-install-recommends -y 7zip jq | ||
| rustup target install aarch64-unknown-none-softfloat | ||
|
|
||
| - name: Build asahi-installer | ||
| id: compile | ||
| run: | | ||
| ./build.sh | ||
| echo "installer_ver=$(cat releases/latest).tar.gz" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Upload artefact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: installer-build | ||
| path: | | ||
| releases/* | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| name: release-dev | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| release-dev: | ||
| uses: ./.github/workflows/release.yaml | ||
| with: | ||
| upload-type: installer-dev |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: release-prod | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - v* | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| release-prod: | ||
| uses: ./.github/workflows/release.yaml | ||
| with: | ||
| upload-type: installer |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: release | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| upload-type: | ||
| required: true | ||
| type: string | ||
| workflow_dispatch: | ||
|
|
||
|
|
||
| jobs: | ||
| build: | ||
| uses: ./.github/workflows/build.yaml | ||
|
|
||
| upload-artefact: | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Download artefact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: installer-build | ||
| path: releases/. | ||
|
|
||
| - name: Push to Bunny | ||
| env: | ||
| PKG_URL: "https://storage.bunnycdn.com/asahilinux/${{ inputs.upload-type }}" | ||
| PKG_VER: "installer-${{ needs.build.outputs.installer_ver }}" | ||
| run: | | ||
| if [ ! -e "releases/${PKG_VER}" ]; then | ||
| echo "Package not found!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| upload() { | ||
| curl -# --fail --request PUT \ | ||
| --url "${2}" \ | ||
| -H "AccessKey: ${{ secrets.BUNNY_TOKEN }}" \ | ||
| -H "Content-Type: ${3}" \ | ||
| -H "Accept: application/json" \ | ||
| --data-binary @${1} | ||
| } | ||
|
|
||
| upload "releases/${PKG_VER}" "${PKG_URL}/${PKG_VER}" "application/octet-stream" | ||
| upload "releases/latest" "${PKG_URL}/latest" "text/plain" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,54 @@ | ||
| # Asahi Linux installer | ||
| The Asahi Linux installer provides a way to install [Asahi Linux](https://asahilinux.org) | ||
| on Apple Silicon Macs. These systems have a bespoke [boot process](https://asahilinux.org/docs/platform/introduction/) | ||
| that requires special considerations to support [alternative operating systems](https://asahilinux.org/docs/platform/open-os-interop/). | ||
| The Asahi Installer takes care of preparing the system for the installation, | ||
| downloading an image of the distribution to install and laying it on disk. | ||
|
|
||
| The Asahi Linux installer provides a way to install [Asahi Linux](https://asahilinux.org) on Apple Silicon Macs. These systems have a bespoke [boot process](https://asahilinux.org/docs/platform/introduction/) that requires special considerations to support [alternative operating systems](https://asahilinux.org/docs/platform/open-os-interop/). The Asahi Installer takes care of preparing the system for the installation, downloading an image of the distribution to install and laying it on disk. | ||
|
|
||
| This repository provides the installer itself, supporting scripts, and the `asahi_firmware` Python module (which is also used by [asahi-scripts](https://github.com/AsahiLinux/asahi-scripts)). | ||
| This repository provides the installer itself, supporting scripts, and the | ||
| `asahi_firmware` Python module (which is also used by [asahi-scripts](https://github.com/AsahiLinux/asahi-scripts)). | ||
|
|
||
| ## Building | ||
|
|
||
| Run `./build.sh`, which will produce an installer tree under `releases/`. By default this will build m1n1 with chainloading support. You can optionally set `M1N1_STAGE1` to a prebuilt m1n1 stage 1 binary, and `LOGO` to a logo in icns format. These are mostly useful for downstream distributions that would like to customize or brand the installer. By default, the build will fetch required dependencies from the Internet and cache them under `dl/`. If this isn't desired, place the required files there before running the build. | ||
| Run `./build.sh`, which will produce an installer tree under `releases/`. By | ||
| default this will build m1n1 with chainloading support. You can optionally set | ||
| `M1N1_STAGE1` to a prebuilt m1n1 stage 1 binary, and `LOGO` to a logo in icns format. | ||
| These are mostly useful for downstream distributions that would like to customize | ||
| or brand the installer. By default, the build will fetch required dependencies from | ||
| the Internet and cache them under `dl/`. If this isn't desired, place the required | ||
| files there before running the build. | ||
|
|
||
| The reference installer at https://alx.sh is deployed from the latest tag of this | ||
| repo by `.github/workflows/release-prod.yaml`. The dev installer at https://alx.sh/dev | ||
| is deployed from the latest push to `main` by `.github/workflows/release-dev.yaml`. | ||
|
|
||
| ## Bootstrapping and branding | ||
|
|
||
| The installer is meant to be executed via a bootstrap script. We provide reference implementations for [local development](scripts/bootstrap.sh) and for alx.sh ([prod](scripts/bootstrap-prod.sh), [dev](scripts/bootstrap-dev.sh)). Following our [distribution guidelines](https://asahilinux.org/docs/alt/policy/), downstream distributions are encouraged to host their own modified copy of these, alongside their downstream build of the installer and their installation images. Downstreams will also want to customize the variable definitions at the beginning of the script, as those will be consumed by the installer and used for its branding. These include: | ||
| The installer is meant to be executed via a bootstrap script. We provide reference | ||
| implementations for [local development](scripts/bootstrap.sh) and for alx.sh | ||
| ([prod](scripts/bootstrap-prod.sh), [dev](scripts/bootstrap-dev.sh)). Following | ||
| our [distribution guidelines](https://asahilinux.org/docs/alt/policy/), downstream | ||
| distributions are encouraged to host their own modified copy of these, alongside | ||
| their downstream build of the installer and their installation images. Downstreams | ||
| will also want to customize the variable definitions at the beginning of the script, | ||
| as those will be consumed by the installer and used for its branding. These include: | ||
|
|
||
| * `VERSION_FLAG`: a URI pointing to the `latest` file within the installer tree | ||
| * `INSTALLER_BASE`: a URL pointing to your installer tree | ||
| * `INSTALLER_DATA`: a URI pointing to your installer medatata file (see [asahi-installer-data](https://github.com/AsahiLinux/asahi-installer) for the one we're using for alx.sh) | ||
| * `INSTALLER_DATA_ALT`: optionally, a URI pointing to an alternative location for your installer metadata file; this can be useful in locations where the primary location might be blocked by local network policies | ||
| * `REPO_BASE`: a URI pointing to your OS images root (meaning, the parent folder of the relative paths referenced inside the metadata file) | ||
| * `INSTALLER_DATA`: a URI pointing to your installer medatata file (see | ||
| [asahi-installer-data](https://github.com/AsahiLinux/asahi-installer) for | ||
| the one we're using for alx.sh) | ||
| * `INSTALLER_DATA_ALT`: optionally, a URI pointing to an alternative location for | ||
| your installer metadata file; this can be useful in locations where the | ||
| primary location might be blocked by local network policies | ||
| * `REPO_BASE`: a URI pointing to your OS images root (meaning, the parent folder | ||
| of the relative paths referenced inside the metadata file) | ||
| * `REPORT`: a URI pointing to the stats server for installation metrics collection | ||
| * `REPORT_TAG`: a string used to identify your distribution for metrics collection | ||
|
|
||
| ## License | ||
|
|
||
| Copyright The Asahi Linux Contributors | ||
|
|
||
| The Asahi Linux installer is distributed under the MIT license. See LICENSE for the license text. | ||
| The Asahi Linux installer is distributed under the MIT license. See LICENSE for the | ||
| license text. | ||
|
|
||
| This installer vendors [python-asn1](https://github.com/andrivet/python-asn1), which is distributed under the same license. | ||
| This installer vendors [python-asn1](https://github.com/andrivet/python-asn1), which | ||
| is distributed under the same license. |
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
This file was deleted.
Oops, something went wrong.
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could be a single
apt-get install ...