CI is broken: workflows reference a missing scripts/build_lib.sh and make targets that don't exist in the repo #38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Every Forgejo Actions workflow in
.forgejo/workflows/sourcesscripts/build_lib.shand/or invokesmake, but the repository contains neither ascripts/directory nor aMakefile. As a resultbuild.yaml— which runs on everypush— fails immediately, and the tag-triggeredbuild-linux.yaml/build-macos.yaml/release.yamlworkflows are also dead.Evidence
.forgejo/workflows/build.yaml:.forgejo/workflows/build-linux.yamlandbuild-macos.yamllikewise dosource scripts/build_lib.shand callsetup_linux_toolchain/build_binaries/publish_binaries/forge_configfrom it.But:
There are also no
*.nuscripts, despiteREADME.mdclaiming "All lifecycle management uses Nu shell service scripts only" and "No Makefiles or bash scripts".Impact
build.yamlcannot pass.Suggested fix
Pick one and make it consistent across README + workflows:
scripts/build_lib.shhelper (withsetup_linux_toolchain,build_binaries,publish_binaries,forge_config,bin_dir) and aMakefilewithcheck,test,fmt-check,buildtargets — i.e. restore what the workflows expect; orcargodirectly (cargo fmt --check,cargo clippy,cargo test --workspace,cargo build --release --workspace) and drop thescripts/build_lib.shdependency.release.yamlalready does (2) inline, so option (2) is the smaller change.Analysis
Every
.forgejo/workflows/file exceptrelease.yamldepends on two missing resources:scripts/build_lib.sh— sourced at the top of every step, providing shell functions (setup_linux_toolchain,build_binaries,publish_binaries,forge_config,bin_dir)Makefile— expected bybuild.yamlwith targetscheck,test,fmt-check,buildNeither
scripts/norMakefileexist in the repository. This causes CI to fail on every push and every tag.release.yamlalready sidesteps both dependencies: it callscargodirectly, manages toolchains withrustup target add, and uploads release artifacts via rawcurlcalls to the Forgejo API. This makes option 2 (rewrite workflows to usecargodirectly) the consistent, smaller fix.Proposed Changes
1.
build.yaml— Build and Test (push / manual)Replace the two
source scripts/build_lib.sh/makesteps with directcargoinvocations:Keep the
Install system dependenciesstep (capnproto). Remove theBuild, test, and checkandBuild releasesteps entirely. Remove thepermissions: contents: writeline (not needed for CI-only runs).Specific changes:
runsections that sourcebuild_lib.sh)contents: writefrompermissions2.
build-linux.yaml— Tag/Manual Release Build (Linux, cross-compile)Replace every
source scripts/build_lib.shdependency with inline equivalents, mirroringrelease.yaml.build_lib.shfunctionsetup_linux_toolchain "${{ matrix.target }}"rustup target add ${{ matrix.target }}(already works inside the builder container)build_binaries "${{ matrix.target }}"cargo build --release --workspace --target ${{ matrix.target }}forge_config${{ github.token }}directly, same asrelease.yamlbin_dir "${{ matrix.target }}"target/${{ matrix.target }}/release(cross) ortarget/release(native)publish_binaries "${{ matrix.artifact }}"release.yamlStep-by-step changes:
Setup toolchainstep: replacesource scripts/build_lib.sh/setup_linux_toolchainwithrustup target add ${{ matrix.target }}Source cargo envpreamble before each cargo command (same asrelease.yamldoes)Buildstep: replace withcargo build --release --workspace --target ${{ matrix.target }}Publishstep: replaceforge_config/bin_dir/publish_binarieswith the same inline curl release-asset-upload pattern fromrelease.yaml. UseBINARIES: "myfs myfs-hub myfs-tool"as an env var. Use${{ github.token }}instead ofsecrets.FORGEJO_TOKEN(consistent withrelease.yaml).FORGEJO_TOKENto${{ github.token }}3.
build-macos.yaml— Tag/Manual Release Build (macOS)Same approach as
build-linux.yamlbut simpler (no cross-compilation, runs on host):Note:
build-macos.yamlcurrently referencesdarwin-arm64as a hardcoded artifact name. The publish step above preserves that.4. No changes to
release.yamlIt already works correctly. Leave it as-is.
Implementation Notes
ghcr.io/despiegk/builder:latest) already has Rust toolchain installed — thesource $HOME/.cargo/envguard is enough.capnproto,musl-dev,musl-toolssystem deps must remain in theInstall system dependenciessteps where needed.BINARIESenv var"myfs myfs-hub myfs-tool"is derived fromrelease.yamland the workspace members (myfs-tool,myfs-hub, plus themyfsbinary provided by one of the member crates).README.mdsection about "Nu shell service scripts only" / "No Makefiles or bash scripts" to reflect the actual state (no Makefile, no Nu scripts — just workflows that call cargo directly).release.yaml.