-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: create separate goldboot-linux crate
- Loading branch information
Showing
22 changed files
with
114 additions
and
122 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
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 |
---|---|---|
|
@@ -30,32 +30,20 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
target: | ||
# TODO: re-enable these. Problems arise with cross-rs because the base | ||
# image doesn't have libgtk-4-dev... | ||
# - aarch64-unknown-linux-gnu | ||
# - aarch64-unknown-linux-musl | ||
# - i686-unknown-linux-gnu | ||
- aarch64-unknown-linux-gnu | ||
- aarch64-unknown-linux-musl | ||
- i686-unknown-linux-gnu | ||
- x86_64-unknown-linux-gnu | ||
# - x86_64-unknown-linux-musl | ||
- x86_64-unknown-linux-musl | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libudev-dev libgtk-4-dev libglib2.0-dev | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-tags: true | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release --target ${{ matrix.target }} --features gui | ||
args: --release --target ${{ matrix.target }} --exclude goldboot-linux | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -79,26 +67,45 @@ jobs: | |
done | ||
goldboot-linux: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-24.04 | ||
needs: linux | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libudev-dev libgtk-4-dev libglib2.0-dev | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
name: goldboot-x86_64-unknown-linux-musl | ||
path: linux-amd64 | ||
toolchain: nightly | ||
override: true | ||
|
||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
|
||
- name: Build goldboot-linux image x86_64 | ||
run: | | ||
export RUST_BACKTRACE=1 | ||
export RUST_LOG=debug | ||
chmod +x linux-amd64/goldboot | ||
linux-amd64/goldboot init --os Goldboot | ||
linux-amd64/goldboot cast --output goldboot-linux-x86_64.gb . | ||
target/release/goldboot init --os Goldboot --executable target/release/goldboot-linux | ||
target/release/goldboot cast --output goldboot-linux-x86_64.gb . | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: goldboot-linux-x86_64.gb | ||
path: goldboot-linux-x86_64.gb | ||
- name: Upload artifacts to release | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} | ||
run: | | ||
for tag in $(git tag --points-at HEAD); do | ||
if [ "${tag%-*}" = "goldboot-linux" ]; then | ||
mv target/release/${tag%-*} "${tag%-*}_x86_64-unknown-linux-gnu" | ||
gh release upload "${tag}" "${tag%-*}_x86_64-unknown-linux-gnu" | ||
mv goldboot-linux-x86_64.gb "${tag%-*}_x86_64-unknown-linux-gnu.gb" | ||
gh release upload "${tag}" "${tag%-*}_x86_64-unknown-linux-gnu.gb" | ||
fi | ||
done | ||
macos: | ||
runs-on: macos-latest | ||
|
@@ -116,7 +123,7 @@ jobs: | |
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
args: --release --exclude goldboot-linux | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -150,7 +157,7 @@ jobs: | |
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
args: --release --exclude goldboot-linux | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -247,7 +254,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-tags: true | ||
|
||
- name: Find version tags | ||
|
@@ -271,12 +277,14 @@ jobs: | |
run: | | ||
echo "${AUR_PRIVATE_KEY}" >/tmp/id_rsa | ||
chmod 600 /tmp/id_rsa | ||
cd dist/pacman/${{ matrix.package }} | ||
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
ssh-keyscan -H aur.archlinux.org >/tmp/known_hosts | ||
GIT_SSH_COMMAND='ssh -i /tmp/id_rsa -o UserKnownHostsFile=/tmp/known_hosts' git submodule update --init dist/pacman/${{ matrix.package }} | ||
cd dist/pacman/${{ matrix.package }} | ||
git add .SRCINFO PKGBUILD | ||
git commit -m "release: ${{ steps.get_tags.outputs.pkgver }}" | ||
GIT_SSH_COMMAND='ssh -i /tmp/id_rsa -o UserKnownHostsFile=/tmp/known_hosts' git push -u origin master |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,25 @@ | ||
[package] | ||
authors = ["Tyler Cook"] | ||
description = "A command-line application for building goldboot images" | ||
edition = "2021" | ||
homepage = "https://goldboot.org" | ||
license = "AGPL-3.0-only" | ||
name = "goldboot-linux" | ||
repository = "https://github.com/fossable/goldboot" | ||
rust-version = "1.74" | ||
version = "0.0.1" | ||
|
||
[dependencies] | ||
block-utils = { version = "0.11.1" } | ||
built = { version = "0.7", features = ["chrono", "semver"] } | ||
clap = { version = "4.4.7", features = ["derive", "string"] } | ||
gdk4 = { version = "0.8.1" } | ||
gdk-pixbuf = { version = "0.19.2" } | ||
glib-macros = { version = "0.19.2" } | ||
glib = { version = "0.19.2" } | ||
goldboot-image = { path="../goldboot-image", version = "0.0.2" } | ||
goldboot = { path="../goldboot", version = "0.0.7" } | ||
gtk4 = { version = "0.8.1", features = ["v4_12"] } | ||
tracing = "0.1.40" | ||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } | ||
ubyte = "0.10.4" |
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,4 @@ | ||
## goldboot-linux | ||
|
||
This crate is loaded into a special Linux distribution used to apply `goldboot` | ||
images. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
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,17 @@ | ||
use clap::Parser; | ||
use std::process::ExitCode; | ||
|
||
pub mod gui; | ||
|
||
#[derive(Parser, Debug)] | ||
#[clap(author, version, about, long_about = None)] | ||
struct CommandLine { | ||
/// Run the GUI in fullscreen mode | ||
#[clap(long, num_args = 0)] | ||
fullscreen: bool, | ||
} | ||
|
||
fn main() -> ExitCode { | ||
let command_line = CommandLine::parse(); | ||
crate::gui::load_gui(command_line.fullscreen) | ||
} |
Oops, something went wrong.