Skip to content

Commit

Permalink
Merge pull request #426 from nlevee/feat/switch-sqlite-lib
Browse files Browse the repository at this point in the history
feat(sqlite): abandon crawshaw.io/sqlite
  • Loading branch information
varbhat authored Nov 26, 2023
2 parents 3437fbf + bebcef1 commit 445a64b
Show file tree
Hide file tree
Showing 11 changed files with 116 additions and 68 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,52 @@ jobs:
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
build-binaries-darwin:
runs-on: macos-11
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
cache-dependency-path: internal/web/package-lock.json

- name: Install node dependencies
run: npm ci
working-directory: internal/web
- name: Build frontend
run: make web

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
cache: true

- name: Build amd64
run: make app-no-sl
env:
GOOS: darwin
GOARCH: amd64

- name: Build arm64
run: make app-no-sl
env:
GOOS: darwin
GOARCH: arm64

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: binaries-darwin
path: build/*
if-no-files-found: error

build-binaries-linux:
runs-on: ubuntu-22.04
permissions:
Expand Down Expand Up @@ -95,6 +141,7 @@ jobs:
gh-release:
needs:
- build-binaries-linux
- build-binaries-darwin
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
permissions:
Expand All @@ -113,5 +160,6 @@ jobs:
fail_on_unmatched_files: true
files: |
${{steps.binaries.outputs.download-path}}/binaries-linux/*
${{steps.binaries.outputs.download-path}}/binaries-darwin/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ web-ci:
##app: Build the Application
.PHONY: app
app:
env CGO_ENABLED=1 go build -trimpath -buildmode=pie -ldflags '-extldflags "-static -s -w -Wl,--allow-multiple-definition"' -o build/$(APP_NAME) $(MAIN_SOURCE)
env CGO_ENABLED=1 go build -trimpath -buildmode=pie -ldflags '-extldflags "-static -s -w"' -o build/$(APP_NAME) $(MAIN_SOURCE)

##app-no-ui: Build the Application without UI
.PHONY: app-no-ui
app-no-ui:
env CGO_ENABLED=1 go build -tags noui -trimpath -buildmode=pie -ldflags '-extldflags "-static -s -w -Wl,--allow-multiple-definition"' -o build/$(APP_NAME) $(MAIN_SOURCE)
env CGO_ENABLED=1 go build -tags noui -trimpath -buildmode=pie -ldflags '-extldflags "-static -s -w"' -o build/$(APP_NAME) $(MAIN_SOURCE)

##app-no-buildflags: Build the Application without any buildflags
.PHONY: app-no-buildflags
Expand Down
33 changes: 16 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ module github.com/varbhat/exatorrent
go 1.21

require (
crawshaw.io/sqlite v0.3.3-0.20220618202545-d1964889ea3c
github.com/anacrolix/chansync v0.3.0
github.com/anacrolix/go-libutp v1.3.1
github.com/anacrolix/log v0.14.3-0.20230823030427-4b296d71a6b4
github.com/anacrolix/log v0.14.5
github.com/anacrolix/torrent v1.53.1
github.com/go-llsqlite/crawshaw v0.5.0
github.com/google/uuid v1.4.0
github.com/gorilla/websocket v1.5.1
github.com/jackc/pgx/v4 v4.18.1
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/shirou/gopsutil v3.21.11+incompatible
golang.org/x/crypto v0.14.0
golang.org/x/crypto v0.15.0
golang.org/x/time v0.4.0
)

require (
github.com/RoaringBitmap/roaring v1.6.0 // indirect
github.com/ajwerner/btree v0.0.0-20211221152037-f427b3e689c0 // indirect
github.com/alecthomas/atomic v0.1.0-alpha2 // indirect
github.com/anacrolix/dht/v2 v2.20.0 // indirect
github.com/anacrolix/dht/v2 v2.21.0 // indirect
github.com/anacrolix/envpprof v1.3.0 // indirect
github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 // indirect
github.com/anacrolix/missinggo v1.3.0 // indirect
Expand All @@ -40,8 +40,7 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/edsrzf/mmap-go v1.1.0 // indirect
github.com/go-llsqlite/adapter v0.0.0-20230927005056-7f5ce7f0c916 // indirect
github.com/go-llsqlite/crawshaw v0.4.0 // indirect
github.com/go-llsqlite/adapter v0.1.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
Expand All @@ -58,21 +57,21 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mschoch/smat v0.2.0 // indirect
github.com/pion/datachannel v1.5.5 // indirect
github.com/pion/dtls/v2 v2.2.7 // indirect
github.com/pion/dtls/v2 v2.2.8 // indirect
github.com/pion/ice/v2 v2.3.11 // indirect
github.com/pion/interceptor v0.1.25 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns v0.0.9 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/rtcp v1.2.10 // indirect
github.com/pion/rtp v1.8.2 // indirect
github.com/pion/rtcp v1.2.12 // indirect
github.com/pion/rtp v1.8.3 // indirect
github.com/pion/sctp v1.8.9 // indirect
github.com/pion/sdp/v3 v3.0.6 // indirect
github.com/pion/srtp/v2 v2.0.17 // indirect
github.com/pion/srtp/v2 v2.0.18 // indirect
github.com/pion/stun v0.6.1 // indirect
github.com/pion/transport/v2 v2.2.4 // indirect
github.com/pion/turn/v2 v2.1.4 // indirect
github.com/pion/webrtc/v3 v3.2.21 // indirect
github.com/pion/webrtc/v3 v3.2.23 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
Expand All @@ -83,16 +82,16 @@ require (
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.etcd.io/bbolt v1.3.8 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/metric v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.17.0 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/libc v1.30.0 // indirect
modernc.org/libc v1.34.9 // indirect
modernc.org/mathutil v1.6.0 // indirect
modernc.org/memory v1.7.2 // indirect
modernc.org/sqlite v1.27.0 // indirect
Expand Down
Loading

0 comments on commit 445a64b

Please sign in to comment.