4 Commits

Author SHA1 Message Date
daf23b9bb7 add readme
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 20s
Gentoo Utils / grep (push) Successful in 4s
Gentoo Utils / check-format (push) Successful in 10s
Gentoo Utils / docs (push) Successful in 18s
Gentoo Utils / build (push) Successful in 28s
Gentoo Utils / test (push) Successful in 34s
Gentoo Utils / fuzz (push) Successful in 1m26s
2025-12-27 12:31:57 -06:00
b87177d7a0 ci: fix build cache path
All checks were successful
Gentoo Utils / grep (push) Successful in 4s
Gentoo Utils / check-format (push) Successful in 10s
Gentoo Utils / build-oci-image (push) Successful in 20s
Gentoo Utils / docs (push) Successful in 18s
Gentoo Utils / build (push) Successful in 29s
Gentoo Utils / test (push) Successful in 34s
Gentoo Utils / fuzz (push) Successful in 1m22s
2025-12-27 12:28:27 -06:00
4fb2466a3a ci: redo docker build logic 2025-12-27 12:28:25 -06:00
6e1975107a update cache
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 7m31s
Gentoo Utils / grep (push) Successful in 1m26s
Gentoo Utils / docs (push) Successful in 1m32s
Gentoo Utils / check-format (push) Successful in 1m34s
Gentoo Utils / build (push) Successful in 1m44s
Gentoo Utils / test (push) Successful in 33s
Gentoo Utils / fuzz (push) Successful in 1m19s
2025-12-27 11:34:29 -06:00
2 changed files with 86 additions and 63 deletions

View File

@@ -15,17 +15,17 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Restore git cache
uses: actions/cache@v4
with:
path: .git
key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }}
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Detect Changes
uses: dorny/paths-filter@v3
id: image-changes
@@ -91,23 +91,20 @@ jobs:
container:
image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Build Cache Setup
uses: actions/cache@v5
- name: Restore git cache
uses: actions/cache@v4
with:
path: |
subprojects
build
key: build-${{ gitea.repository }}-${{ gitea.sha }}
path: build
key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }}
- name: Build
- name: Checkout repo
uses: actions/checkout@v5
- name: build and check
run: |
meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized -Ddocs=enabled build
meson compile -C build
# FIXME: Currently this rebuilds everything. Instead we should bring over the build dir from the build job. This will come in handy
# when we have multiple build targets and configs. What we have currently is fine until we get lots of builds going
test:
@@ -119,25 +116,19 @@ jobs:
container:
image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Restore build cache
uses: actions/cache/restore@v5
- name: Restore git cache
uses: actions/cache@v4
with:
path: |
subprojects
build
key: build-${{ gitea.repository }}-${{ gitea.sha }}
path: build
key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }}
- name: Checkout repo
uses: actions/checkout@v5
- name: test
run: |
set -x
[ -d build ] || echo "build doesnt exist"
[ -d build ] || meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized -Ddocs=enabled build
meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized -Ddocs=enabled build
meson compile -C build
ninja test -C build
set +x
fuzz:
runs-on: gentoo
@@ -149,16 +140,14 @@ jobs:
container:
image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Restore Build Cache
uses: actions/cache/restore@v5
- name: Restore git cache
uses: actions/cache@v4
with:
path: |
subprojects
build
key: build-${{ gitea.repository }}-${{ gitea.sha }}
path: build
key: gitea-repo-${{ gitea.repository }}-${{ gitea.ref }}
- name: Checkout repo
uses: actions/checkout@v5
# FIXME: Get rid of this step when portage has fixes merged?
# needed because portage has fixes upstream we need that arent stable yet
- name: Checkout tip of portage
@@ -173,55 +162,39 @@ jobs:
run: |
source ./portage/.venv/bin/activate
which emerge
[ -d build ] || meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build
meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build
meson compile atom_parser_fuzzer:alias -C build
timeout 10m ./scripts/atom_parser_fuzz.sh
continue-on-error: true
check-format:
runs-on: gentoo
needs: [build-oci-image, build]
needs: [build-oci-image]
container:
image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Restore Build Cache
uses: actions/cache/restore@v5
with:
path: |
subprojects
build
key: build-${{ gitea.repository }}-${{ gitea.sha }}
uses: actions/checkout@v5
- name: Check Formatting
run: |
[ -d build ] || meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build
meson setup -Dfuzz=enabled -Dtests=enabled -Dbuildtype=debugoptimized build
meson format --check-only --recursive
ninja rustfmt -C build
docs:
runs-on: gentoo
needs: [build-oci-image, build]
needs: [build-oci-image]
container:
image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Restore Build Cache
uses: actions/cache/restore@v5
with:
path: |
subprojects
build
key: build-${{ gitea.repository }}-${{ gitea.sha }}
uses: actions/checkout@v5
- name: Build Documentation
run: |
[ -d build ] || meson setup -Ddocs=enabled build
ninja rustdoc -C build
meson setup -Ddocs=enabled docs
ninja rustdoc -C docs
grep:
runs-on: gentoo
@@ -230,7 +203,7 @@ jobs:
image: ${{ vars.REGISTRY_URL }}/${{ gitea.repository }}:${{ needs.build-oci-image.outputs.image_tag }}
steps:
- name: Checkout repo
uses: actions/checkout@v6
uses: actions/checkout@v5
- name: grep for patterns
# negate git grep ret code because 1 means no findings

50
README.org Normal file
View File

@@ -0,0 +1,50 @@
#+title: Gentoo Utils
* Getting Started
Gentoo Utils must be compiled from source currently. See the compiling from source section for more information.
* Development :development:contributing:
There are two main avenues for development:
- compiling normally using packages via portage
- using the podman container
** Development without using a podman container
*** Install Build Prerequisites
- dev-lang/rust-bin-9999
- llvm-core/clang
- llvm-core/lld
- sys-process/parallel (Needed for =check.sh=)
- dev-build/meson
Install build deps:
#+begin_src bash :noeval
emerge -a dev-lang/rust-bin-9999 \
llvm-core/clang \
llvm-core/lld \
sys-process/parallel
#+end_src
Compiling this project currently requires using a patched meson. Install patched meson:
#+begin_src bash :noeval
EGIT_OVERRIDE_REPO_MESONBUILD_MESON=https://jturnerusa.dev/cgit/meson emerge -a =dev-build/meson-9999::gentoo
#+end_src
** Development using a podman container
The podman image comes with all the tools required to compile gentoo-utils.
Clone the repo
#+begin_src bash :noeval
git clone https://git.epenguin.net/gentoo-utils/gentoo-utils.git
cd gentoo-utils
#+end_src
Run the check script:
#+begin_src bash :noeval
podman run --rm --userns=keep-id -v $PWD:/workspace git.epenguin.net/gentoo-utils/gentoo-utils:latest ./check.sh
#+end_src
* Resources
pms-utils spec link