Compare commits

...
19 Commits
Author SHA1 Message Date
Greg Hellings df82129c18 Give the release a name, also
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (ucrt) (push) Successful in 19s
build.yml / build (x86) (push) Successful in 19s
build.yml / release (push) Successful in 32s
2026-08-06 22:48:12 -05:00
Greg Hellings c79128dbcf Uses existing tools in builder image
build.yml / build (ucrt) (push) Successful in 22s
build.yml / build (x86) (push) Successful in 22s
build.yml / release (push) Successful in 30s
2026-08-06 22:44:09 -05:00
Greg Hellings ac26163234 Allow dirs without zips
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (x86) (push) Successful in 17s
build.yml / build (ucrt) (push) Successful in 19s
build.yml / release (push) Successful in 37s
2026-08-06 22:25:31 -05:00
Greg Hellings de5bf573cd Unpack artifacts
buildbot/nix-eval Build done.
build.yml / build (ucrt) (push) Successful in 13s
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (x86) (push) Successful in 18s
build.yml / release (push) Failing after 38s
2026-08-06 22:23:42 -05:00
Greg Hellings 3a3a0ba68b Use globs for files
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
build.yml / build (ucrt) (push) Successful in 19s
buildbot/nix-effects Build done.
build.yml / build (x86) (push) Successful in 28s
build.yml / release (push) Successful in 33s
2026-08-06 22:16:33 -05:00
Greg Hellings 980140c287 Include prefix for artifacts
build.yml / build (ucrt) (push) Successful in 18s
build.yml / build (x86) (push) Successful in 40s
build.yml / release (push) Successful in 41s
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
2026-08-06 22:12:48 -05:00
Greg Hellings 608cc25d19 Must include flake name
build.yml / build (x86) (push) Successful in 12s
build.yml / build (ucrt) (push) Successful in 41s
build.yml / release (push) Successful in 52s
2026-08-06 20:37:24 -05:00
Greg Hellings c2ac0cf586 Build on bare bare metal servers
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (x86) (push) Failing after 4s
build.yml / release (push) Canceled after 0s
build.yml / build (ucrt) (push) Canceled after 15m25s
* Allow builds to use cached Nix packages
* Prevent them from running on my VPS
* Possibly avoid re-downloading the SVN every single time?
2026-08-06 20:17:23 -05:00
Greg Hellings 49f5bf24ed Give builds a name
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (ucrt) (push) Successful in 20m1s
build.yml / build (x86) (push) Successful in 19m55s
build.yml / release (push) Failing after 20s
2026-08-06 19:33:49 -05:00
Greg Hellings f315b03580 Pin old download-artifact action
buildbot/nix-effects Build done.
build.yml / build (ucrt) (push) Successful in 7m24s
build.yml / build (x86) (push) Successful in 20m25s
build.yml / release (push) Successful in 21s
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
2026-08-06 09:30:21 -05:00
Greg Hellings faf9d4dd9d Use gitea release action
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / release (push) Failing after 20s
build.yml / build (ucrt) (push) Successful in 10m12s
build.yml / build (x86) (push) Successful in 6m54s
2026-08-06 08:22:37 -05:00
Greg Hellings d9b3838cbd Use gitea artifact actions
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (ucrt) (push) Successful in 8m6s
build.yml / build (x86) (push) Successful in 8m5s
build.yml / release (push) Failing after 19s
2026-08-06 08:12:33 -05:00
Greg Hellings 8de9f6eb71 Add arm for testing in the future
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (ucrt) (push) Failing after 8m58s
build.yml / build (x86) (push) Failing after 22m22s
build.yml / release (push) Skipped
2026-08-05 22:23:26 -05:00
Greg Hellings 002897dfdc Fix artifact path 2026-08-05 22:03:49 -05:00
Greg Hellings a50754a3cc Add release step to builds
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (ucrt) (push) Failing after 11m0s
build.yml / build (x86) (push) Failing after 11m8s
build.yml / release (push) Skipped
2026-08-05 22:01:36 -05:00
Greg Hellings 73b70b5bc7 Build target name fixing
buildbot/nix-eval Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.
build.yml / build (x86) (push) Successful in 14m44s
build.yml / build (ucrt) (push) Successful in 14m46s
2026-08-05 14:03:15 -05:00
Greg Hellings 6c5f5b0de5 r3916 update 2026-08-05 09:11:03 -05:00
Greg Hellings 688e63ce04 Update and build script
build.yml / build (x86) (push) Failing after 13s
build.yml / build (ucrt) (push) Failing after 3m44s
2026-08-05 08:41:36 -05:00
Greg Hellings 52a5ec3954 Simplify back to baseline 2026-08-05 08:08:39 -05:00
6 changed files with 162 additions and 87 deletions
+51
View File
@@ -0,0 +1,51 @@
"on":
pull_request:
workflow_dispatch:
push:
branches:
- main
tags:
- "*"
jobs:
build:
runs-on: bare-metal
strategy:
matrix:
arch:
- x86
- ucrt
steps:
- uses: actions/checkout@v6
- name: Build
run: |-
nix run -L ".#${{ matrix.arch }}"
mv sword.tar.xz sword-${{ matrix.arch }}.tar.xz
- name: Upload artifact
uses: https://gitea.com/actions/gitea-upload-artifact@v7
with:
name: ${{ matrix.arch }}
path: sword-${{ matrix.arch }}.tar.xz
release:
needs: build
runs-on: nix-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Download artifacts
uses: https://gitea.com/actions/download-artifact@v3-node20
- id: date
name: Generate date
run: |-
echo "DATE=$(date +'%Y-%m-%d-%H')" >> "$GITHUB_OUTPUT"
for d in $(find -maxdepth 1 -type d); do
unzip -d . "${d}"/*.zip || true
done
ls -lR
- name: Create release
uses: https://gitea.com/actions/gitea-release-action@v1
with:
name: ${{ steps.date.outputs.DATE }}
tag_name: ${{ steps.date.outputs.DATE }}
files: |-
*.tar.xz
+10
View File
@@ -0,0 +1,10 @@
"on":
pull_request:
jobs:
check:
runs-on: bare-metal
steps:
- uses: actions/checkout@v6
- name: Flake check
run: nix flake check -L
+49
View File
@@ -0,0 +1,49 @@
on:
schedule:
- cron: "7 23 * * *"
workflow_dispatch:
jobs:
update:
runs-on: nix-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Update flake.lock
run: nix flake update
- name: Create PR if changed
env:
GITEA_TOKEN: ${{ secrets.KLAATU_TOKEN }}
GITEA_URL: https://src.thehellings.com
REPO: greg/mingw-sword-build
run: |
if git diff --quiet flake.lock; then
echo "flake.lock unchanged, nothing to do"
exit 0
fi
BRANCH="auto/update-flake-lock-$(date +%Y%m%d)"
git config user.email "klaatu@thehellings.com"
git config user.name "klaatu"
git checkout -b "$BRANCH"
git add flake.lock
git commit -m "chore: update flake.lock $(date +%Y-%m-%d)"
# Push branch using token auth
git remote set-url origin "https://klaatu:${GITEA_TOKEN}@${GITEA_URL#https://}/${REPO}.git"
git push origin "$BRANCH"
# Create PR via Gitea API
curl -s -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_URL}/api/v1/repos/${REPO}/pulls" \
-d "{
\"title\": \"chore: update flake.lock $(date +%Y-%m-%d)\",
\"head\": \"$BRANCH\",
\"base\": \"main\",
\"body\": \"Automated weekly flake.lock update.\\n\\nGenerated by Gitea Actions.\",
\"assignees\": [\"greg\"]
}"
Generated
+20 -59
View File
@@ -1,33 +1,17 @@
{
"nodes": {
"aarch_fix": {
"locked": {
"lastModified": 1753636920,
"narHash": "sha256-BZq0xc6+3OVxUE+re+Rd+5+JqmGUARxa0M1waMkscyk=",
"owner": "greg-hellings",
"repo": "nixpkgs",
"rev": "54692b15811727c1cd367dbd82e6e22abd1bd057",
"type": "github"
},
"original": {
"owner": "greg-hellings",
"ref": "ucrt/zlib",
"repo": "nixpkgs",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"lastModified": 1767039857,
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "NixOS",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github"
},
"original": {
"owner": "edolstra",
"owner": "NixOS",
"repo": "flake-compat",
"type": "github"
}
@@ -37,11 +21,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1754487366,
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
"lastModified": 1785627969,
"narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
"rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a",
"type": "github"
},
"original": {
@@ -65,39 +49,17 @@
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1754416808,
"narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=",
"lastModified": 1784288435,
"narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864",
"rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9",
"type": "github"
},
"original": {
@@ -108,11 +70,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1754340878,
"narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=",
"lastModified": 1782918843,
"narHash": "sha256-ETYnV9U7Sr+A45dohzZdfCZKOss4qrTkO+wgNZNvEc0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cab778239e705082fe97bb4990e0d24c50924c04",
"rev": "e8273b29fe1390ec8d4603f2477357555291432e",
"type": "github"
},
"original": {
@@ -124,11 +86,11 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1753579242,
"narHash": "sha256-zvaMGVn14/Zz8hnp4VWT9xVnhc8vuL3TStRqwk22biA=",
"lastModified": 1785031560,
"narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "0f36c44e01a6129be94e3ade315a5883f0228a6e",
"rev": "0e79af5e3d4dcfcd676ab5ba3f95d2e3352e078c",
"type": "github"
},
"original": {
@@ -139,11 +101,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1754393734,
"narHash": "sha256-fbnmAwTQkuXHKBlcL5Nq1sMAzd3GFqCOQgEQw6Hy0Ak=",
"lastModified": 1785747939,
"narHash": "sha256-D740uKsMbgsfK2oaDenJLLPIZfq7W0/g4KN/Fls8eKs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a683adc19ff5228af548c6539dbc3440509bfed3",
"rev": "104240a772428cc2e20d8fd86c9ddbb886bbaff2",
"type": "github"
},
"original": {
@@ -155,7 +117,6 @@
},
"root": {
"inputs": {
"aarch_fix": "aarch_fix",
"flake-parts": "flake-parts",
"flake-root": "flake-root",
"hooks": "hooks",
+27 -20
View File
@@ -14,7 +14,6 @@
flake-parts.url = "github:hercules-ci/flake-parts";
flake-root.url = "github:srid/flake-root";
hooks.url = "github:cachix/git-hooks.nix";
aarch_fix.url = "github:greg-hellings/nixpkgs/ucrt/zlib";
};
outputs =
@@ -32,18 +31,17 @@
];
perSystem =
{ pkgs, self', ... }@inputs':
let
arm = (import inputs.aarch_fix { inherit (inputs') system; });
in
{
_module.args.pkgs = import inputs.nixpkgs {
inherit (inputs') system;
overlays = [
(_: p: {
nghttp3 = p.nghttp3.overrideAttrs { meta.platforms = pkgs.lib.platforms.all; };
ngtcp2 = p.ngtcp2.overrideAttrs { meta.platforms = pkgs.lib.platforms.all; };
})
];
_module.args = {
pkgs = import inputs.nixpkgs {
inherit (inputs') system;
overlays = [
(_: p: {
nghttp3 = p.nghttp3.overrideAttrs { meta.platforms = pkgs.lib.platforms.all; };
ngtcp2 = p.ngtcp2.overrideAttrs { meta.platforms = pkgs.lib.platforms.all; };
})
];
};
};
devShells.default = pkgs.mkShell {
@@ -67,7 +65,7 @@
end-of-file-fixer.enable = true;
fix-byte-order-marker.enable = true;
mixed-line-endings.enable = true;
nixfmt-rfc-style.enable = true;
nixfmt.enable = true;
trim-trailing-whitespace.enable = true;
};
};
@@ -79,16 +77,25 @@
tar =
win:
let
svnSword = (
win.sword.overrideAttrs {
svnSword =
(win.sword.overrideAttrs {
src = pkgs.fetchsvn {
url = "https://svn.crosswire.org/svn/sword/trunk";
rev = "3914";
hash = "sha256-yqZtUb86KILTYcshe/qim5+H57ktKlH3Uiic6KDKnrQ=";
rev = "3916";
hash = "sha256-eucivqgAeNpcwsyn2Il0+eX1X6rJHJQo1jF+jzE3IxE=";
};
patches = [ ];
}
);
}).override
{
curl = curlMinimal;
};
curlMinimal = win.curlMinimal.overrideAttrs (final: {
buildInputs = [ ];
# This causes circular dependencies on bash, which is not supported in MinGW
postInstall = final.postInstall + ''
rm "''${!outputBin}/bin/wcurl"
'';
});
in
pkgs.writeShellApplication {
name = "package-sword";
@@ -110,7 +117,7 @@
default = tar mingwW64;
x86 = tar mingwW64;
ucrt = tar ucrt64;
ucrtAarch = tar arm.pkgsCross.ucrtAarch64;
arm = tar ucrtAarch64;
update = pkgs.callPackage ./update.nix { };
};
};
+5 -8
View File
@@ -2,7 +2,7 @@
writeShellApplication,
gnugrep,
gnused,
nix-prefetch,
nix-prefetch-svn,
subversion,
}:
writeShellApplication {
@@ -10,7 +10,7 @@ writeShellApplication {
runtimeInputs = [
gnugrep
gnused
nix-prefetch
nix-prefetch-svn
subversion
];
@@ -25,12 +25,9 @@ writeShellApplication {
else
echo "DO_UPDATE=1"
fi
hash="$(nix-prefetch \
--check-store \
--option extra-experimental-features flakes \
fetchsvn \
--url "$url" \
--rev "$new_rev" \
hash="$(nix-prefetch-svn \
"$url" \
"$new_rev" \
)"
echo "HASH=$hash"
sed -i flake.nix \