Compare commits

...

4 commits

Author SHA1 Message Date
00e3781049
oizys-go QOL 2024-06-20 13:41:18 -05:00
564a38dc85
typo in hosts 2024-06-20 12:47:16 -05:00
6d21fadbf7
go back to unstable version 2024-06-20 12:23:34 -05:00
4f174390a8
silence apt-get 2024-06-20 12:19:10 -05:00
6 changed files with 25 additions and 34 deletions

View file

@ -41,7 +41,7 @@ runs:
sudo apt-get purge \
--allow-remove-essential \
-qq \
$(non_manifest_packages) &
$(non_manifest_packages) > /dev/null &
fi
wait

View file

@ -3,7 +3,7 @@ name: Build NixOS (on demand)
on:
workflow_dispatch:
inputs:
host:
hosts:
description: 'list of hosts to build'
required: true
default: 'othalan algiz'
@ -14,15 +14,14 @@ on:
workflow_call:
inputs:
host:
hosts:
description: 'list of hosts to build'
required: true
default: 'othalan aligz'
default: 'othalan algiz'
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
cancel-in-progress: true
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.host }}
# cancel-in-progress: true
jobs:
build:
@ -52,10 +51,12 @@ jobs:
- name: Build
run: |
for host in ${{ inputs.host }}; do
cachix watch-exec daylin -- \
oizys build --system-path \
--host "$host" \
--flake . -- \
--print-build-logs
for host in ${{ inputs.hosts }}; do
nix run . \
-- \
build --system-path \
--host "$host" \
--flake . \
-- \
--print-build-logs
done

View file

@ -13,20 +13,6 @@ concurrency:
cancel-in-progress: true
jobs:
# checks:
# uses: ./.github/workflows/checks.yml
# secrets: inherit
build:
# needs: checks
strategy:
max-parallel: 1
matrix:
host:
- othalan
# - mannaz
# - algiz
uses: ./.github/workflows/build.yml
with:
host: "${{ matrix.host }}"
secrets: inherit

View file

@ -55,7 +55,7 @@ func setupLogger() {
log.SetReportTimestamp(false)
styles := log.DefaultStyles()
for k, v := range styles.Levels {
styles.Levels[k] = v.MaxWidth(10)
styles.Levels[k] = v.Width(5).MaxWidth(5)
}
log.SetStyles(styles)
}

View file

@ -1,5 +1,4 @@
{
self,
lib,
installShellFiles,
buildGoModule,
@ -9,11 +8,11 @@
...
}:
let
inherit (lib) mkDate cleanSource makeBinPath;
inherit (lib) cleanSource makeBinPath;
in
buildGoModule {
pname = "oizys";
version = "${self.shortRev or "dirty"}";
version = "unstable";
src = cleanSource ./.;
vendorHash = "sha256-/JVXhXrU2np/ty7AGFy+LPZCo1NaLYl9NAyD9+FJYBI=";

View file

@ -190,6 +190,7 @@ func (p *packages) summary() {
Render(fmt.Sprint(len(p.names))),
)
}
func logCmd(cmd *exec.Cmd) {
log.Debugf("CMD: %s", strings.Join(cmd.Args, " "))
}
@ -237,9 +238,13 @@ func parseDryRun(buf string) (*packages, *packages) {
var parts [2][]string
i := 0
for _, line := range lines {
if strings.Contains(line, "fetch") {
if strings.Contains(line, "fetch") && strings.HasSuffix(line, ":") {
i++
}
if i == 2 {
log.Fatal("failed to parse output", "output", buf)
}
if strings.HasPrefix(line, " ") {
parts[i] = append(parts[i], line)
}
@ -247,7 +252,7 @@ func parseDryRun(buf string) (*packages, *packages) {
if len(parts[0])+len(parts[1]) == 0 {
log.Info("no changes...")
log.Fatal("or failed to parse nix build --dry-run output")
os.Exit(0)
}
return parsePackages(parts[0], "packages to build"),