-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
meta: add distrib script and Gh action
- Loading branch information
1 parent
5638ec1
commit 98a3716
Showing
4 changed files
with
55 additions
and
3 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,33 @@ | ||
name: Nightly Build | ||
on: [push] | ||
|
||
jobs: | ||
ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update -y && \ | ||
sudo apt-get install -y install build-essential git ninja-build nasm gcc-multilib | ||
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" llvm 18 | ||
- name: Build | ||
run: | | ||
./build.sh dist | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bootx64.efi | ||
path: .cutekit/dist/bootx64.efi | ||
if-no-files-found: error |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.cutekit | ||
.cutekit/ | ||
__pycache__/ | ||
.DS_Store |
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,17 @@ | ||
from pathlib import Path | ||
from cutekit import cli, model, builder, shell, const | ||
|
||
|
||
@cli.command("d", "dist", "Make booboot easier to distribute") | ||
def _(args: model.TargetArgs): | ||
registry = model.Registry.use(args) | ||
component = registry.lookup("booboot", model.Component) | ||
dist = Path(const.PROJECT_CK_DIR) / "dist" | ||
dist.mkdir(parents=True, exist_ok=True) | ||
|
||
for target in registry.iter(model.Target): | ||
scope = builder.TargetScope(registry, target) | ||
shell.cp( | ||
builder.build(scope, component)[0].path, | ||
str(dist / target.props["filename"]), | ||
) |
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