Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: package hierarchy #6

Merged
merged 3 commits into from
Sep 5, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '^1.23'
cache-dependency-path: "go/go.sum"
cache-dependency-path: "go.sum"

- name: Install Protoc
uses: arduino/setup-protoc@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '^1.23'
cache-dependency-path: "go/go.sum"
cache-dependency-path: "go.sum"

- name: Install Protoc
uses: arduino/setup-protoc@v3

- name: Build binary
run: make release

- name: ls go/build
run: ls go/build
- name: ls build
run: ls build

- name: Upload the artifacts
uses: skx/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: 'go/build/*.tar.gz go/build/*.zip'
args: 'build/*.tar.gz build/*.zip'
14 changes: 6 additions & 8 deletions .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ on:
push:
branches: [ "main" ]
paths:
- go/**
- proto/**
- .github/**
- '**'
- '!ts/**'
pull_request:
branches: [ "main" ]
paths:
- go/**
- proto/**
- .github/**
- '**'
- '!ts/**'
workflow_dispatch:

jobs:
Expand All @@ -26,10 +24,10 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version: '^1.23'
cache-dependency-path: "go/go.sum"
cache-dependency-path: "go.sum"

- name: Install Protoc
uses: arduino/setup-protoc@v3

- name: Test
run: cd go && make
run: make -f go.mk build
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
node_modules
go.work
package.json
pnpm-lock.yaml
pnpm-lock.yaml
live-pprof
assets/web/html/*
build
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RESET := \033[0m
define print_step
@echo "$(GREEN)===== $(1) =====$(RESET)"
endef

.PHONY: build

all: protoc test build
$(call print_step, Done)
Expand All @@ -16,39 +16,39 @@ release: protoc test build-for-release

protoc:
$(call print_step, Generating protobuf files)
$(MAKE) -C go protoc
$(MAKE) -f go.mk protoc
$(MAKE) -C ts protoc

test:
$(call print_step, Testing)
$(MAKE) -C go test
$(MAKE) -f go.mk test
$(MAKE) -C ts test

build:
$(call print_step, Building)
$(MAKE) -C ts build
$(MAKE) copy
$(MAKE) -C go build
$(MAKE) -f go.mk build

build-for-release:
$(call print_step, Build for releasing)
$(MAKE) -C ts build
$(MAKE) copy
$(MAKE) -C go build-for-release
$(MAKE) -f go.mk build-for-release

clean:
$(call print_step, Cleaning)
$(MAKE) -C go clean
$(MAKE) -f go.mk clean
$(MAKE) -C ts clean
@echo "Removing static files from go"
@if [ -d "./go/assets/web/html" ]; then \
rm -rf ./go/assets/web/html; \
@if [ -d "./assets/web/html" ]; then \
rm -rf ./assets/web/html; \
fi

copy:
$(call print_step, Removing static files from go)
@if [ -d "./go/assets/web/html" ]; then \
rm -rf ./go/assets/web/html; \
@if [ -d "./assets/web/html" ]; then \
rm -rf ./assets/web/html; \
fi
$(call print_step, Copying static files to go)
cp -r ts/out go/assets/web/html
cp -r ts/out assets/web/html
Loading
Loading