Skip to content

Commit

Permalink
feat: pkg tool (#27)
Browse files Browse the repository at this point in the history
raphaelcoeffic authored Jan 16, 2025
1 parent 998f5b9 commit f7a9964
Showing 18 changed files with 1,105 additions and 385 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -29,15 +29,29 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Build program index
env:
ARCH: ${{ matrix.platform.arch }}
run: |
make src/assets/programs.csv build_arch=$ARCH
- name: Build pkg tool
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.platform.target }}
args: "--locked --release --bin pkg"
strip: true

- name: Build base image
env:
ARCH: ${{ matrix.platform.arch }}
TARGET: ${{ matrix.platform.target }}
run: |
if [ "$ARCH" != "$(uname -m)" ]; then
sudo apt-get update
sudo apt-get install qemu-user-static
fi
cargo run --bin build-img -- -a $ARCH
cargo run --bin build-img -- -a $ARCH -b target/$TARGET/release/pkg
cargo clean
- name: Upload artifacts - base image
@@ -46,8 +60,9 @@ jobs:
name: base-${{ matrix.platform.target }}
path: |
base.tar.xz
base.sha256
- name: Build binary
- name: Build dive
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.platform.target }}
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/target
/base
/ofs
nix
image_builder/base.tar.xz
base.tar.xz
base.sha256
/nix
base.*
src/assets/programs.*
102 changes: 57 additions & 45 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -8,18 +8,23 @@ default-run = "dive"
embedded_image = []

[dependencies]
anstream = { version = "0.6.18", default-features = false, features = ["auto"] }
anyhow = "1.0.93"
base64 = "0.22.1"
clap = { version = "4.5.21", features = ["derive", "env"] }
console = "0.15.10"
csv = "1.3.1"
dirs = "5.0"
env_logger = "0.11.5"
exitcode = "1.1.2"
fd-lock = "4.0.2"
include_dir = "0.7.4"
indicatif = "0.17.9"
ioctl-sys = "0.8.0"
itertools = "0.13.0"
libc = "0.2.164"
liblzma = { version = "0.3.5", features = ["static"] }
log = "0.4.22"
owo-colors = "4.1.0"
procfs = { version= "0.17.0" }
regex = "1.11.1"
rustix = { version = "0.38.40", features = ["process", "thread", "mount", "fs", "runtime"] }
@@ -28,11 +33,14 @@ serde_json = "1.0"
sha2 = "0.10.8"
tar = "0.4.43"
tempfile = "3.14.0"
ureq = { version = "2.10.1", default-features = false, features = ["tls", "native-certs", "gzip"] }
ureq = { version = "2.10.1", default-features = false, features = ["tls", "native-certs", "gzip", "json"] }
which = "7.0.0"

[[bin]]
name = "dive"

[[bin]]
name = "build-img"

[[bin]]
name = "pkg"
Loading

0 comments on commit f7a9964

Please sign in to comment.