Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04, macos-13, windows-2019]
os: [windows-2019]
runs-on: ${{ matrix.os }}
env:
CGO_ENABLED: 1
GOARCH: 386
steps:
- uses: actions/checkout@v4

Expand All @@ -28,7 +29,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23
go-version: "1.20"

- name: Release version number
run: echo '${{ github.ref_name}}' > VERSION
Expand All @@ -46,6 +47,10 @@ jobs:
run: go build -ldflags "-linkmode 'external' -extldflags '-static'" -o bin/signls.exe
if: startsWith(matrix.os, 'windows')

- name: Build windows 32
run: go build -ldflags "-linkmode 'external' -extldflags '-static'" -o bin/signls32.exe
if: startsWith(matrix.os, 'windows')

- name: Tar.gz linux|mac files
run: tar -zcvf signls_${{ github.ref_name }}_${{ runner.os}}.tar.gz LICENSE -C bin signls
if: ${{ !startsWith(matrix.os, 'windows') }}
Expand All @@ -56,6 +61,12 @@ jobs:
Compress-Archive bin\signls.exe signls_${{ github.ref_name }}_${{ runner.os}}.zip
if: ${{ startsWith(matrix.os, 'windows') }}

- name: Zip windows 32 files
shell: pwsh
run: |
Compress-Archive bin\signls32.exe signls_${{ github.ref_name }}_${{ runner.os}}_32.zip
if: ${{ startsWith(matrix.os, 'windows') }}

- name: Upload linux|mac artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -72,6 +83,14 @@ jobs:
if-no-files-found: error
if: ${{ startsWith(matrix.os, 'windows') }}

- name: Upload windows 32 artifact
uses: actions/upload-artifact@v4
with:
name: signls_${{ github.sha }}_${{ runner.os}}_32
path: signls_${{ github.ref_name }}_${{ runner.os}}_32.zip
if-no-files-found: error
if: ${{ startsWith(matrix.os, 'windows') }}

release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/checks.yml

This file was deleted.

14 changes: 14 additions & 0 deletions core/common/control_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,17 @@ func (p *ControlValue[T]) SetMax(max T) {
}
p.max = max
}

func min[T Number](a, b T) T {
if a < b {
return a
}
return b
}

func max[T Number](a, b T) T {
if a > b {
return a
}
return b
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module signls

go 1.23
go 1.20

require (
github.com/charmbracelet/bubbles v0.20.0
github.com/charmbracelet/bubbletea v1.2.4
github.com/charmbracelet/lipgloss v1.0.0
gitlab.com/gomidi/midi/v2 v2.2.19
gitlab.com/gomidi/midi/v2 v2.1.7
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1n
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
gitlab.com/gomidi/midi/v2 v2.2.19 h1:/Ktpf21SIOX61gg8PJ7wYLSsD+dOU1e3z3tlO9OS+Zs=
gitlab.com/gomidi/midi/v2 v2.2.19/go.mod h1:ENtYaJPOwb2N+y7ihv/L7R4GtWjbknouhIIkMrJ5C0g=
gitlab.com/gomidi/midi/v2 v2.1.7 h1:lIjVXH+bnGG04j/kUVOFILt0BQvBeGz8Kyz0l6aM830=
gitlab.com/gomidi/midi/v2 v2.1.7/go.mod h1:Cj6K9VH5GhYvPgL2JddxHBmZiP3nxKxB5XyTxiXvL9U=
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
14 changes: 14 additions & 0 deletions ui/util/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ func Clamp(value, minimum, maximum int) int {
func Mod(a, b int) int {
return (a%b + b) % b
}

func min(a, b int) int {
if a < b {
return a
}
return b
}

func max(a, b int) int {
if a > b {
return a
}
return b
}