Skip to content

Commit

Permalink
Fix makefile, update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Oct 8, 2024
1 parent 4761ec0 commit 5206f45
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ sidecar.db*
/sqlite
/sqlite*
go-sidecar
!/sqlite-extensions
12 changes: 2 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Install dependencies
run: make deps-linux
run: make deps
- name: Run tests
run: make ci-test
lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Install dependencies
run: make deps-linux
run: make deps
- name: Run tests
run: make lint
build:
Expand Down
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
FROM debian:stable-slim AS builder
FROM debian:testing-slim AS builder

ARG TARGETARCH

RUN export DEBIAN_FRONTEND=noninteractive && \
apt update && \
apt install -y -q --no-install-recommends \
make \
linux-headers-${TARGETARCH} && \
apt clean && \
rm -rf /var/lib/apt/lists/*
RUN apt update && \
apt install -y make curl git

WORKDIR /build

Expand All @@ -19,4 +14,9 @@ RUN make deps

RUN make build

RUN mv /build/bin/sidecar /usr/local/bin/sidecar

RUN apt clean && \
rm -rf /var/lib/apt/lists/*

ENTRYPOINT ["/usr/local/bin/sidecar"]
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ clean:

.PHONY: build/cmd/sidecar
build/cmd/sidecar:
cd sqlite-extensions && make all && cd -
$(ALL_FLAGS) $(GO) build -o bin/sidecar main.go

.PHONY: build
Expand Down Expand Up @@ -100,7 +101,7 @@ staticcheck:
staticcheck ./...

.PHONY: ci-test
ci-test: test
ci-test: build test

test-rewards:
TEST_REWARDS=true TESTING=true ${GO} test ./pkg/rewards -v -p 1
3 changes: 2 additions & 1 deletion scripts/installDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ if [[ "$OS" == "linux" ]]; then
libsqlite3-0 \
libsqlite3-dev \
python3-dev

which go
if [[ $? != 0 ]]; then
echo "Installing Go 1.22"
apt-get install go
apt-get install -y golang
fi
elif [[ "$OS" == "darwin" ]]; then
hasBrew=$(which brew)
Expand Down

0 comments on commit 5206f45

Please sign in to comment.