Skip to content

Commit

Permalink
fix: Standardizes the way we build (#87)
Browse files Browse the repository at this point in the history
* Remove font embedding from build.

I added this when I was doing a lot of font work, but now that I'm not
it really is annoying to generate fonts each time. This commit makes it
so the only target for build is a clean.

* Remove build directory in make.

This is unncessary and I feel bad for adding it. I've removed it so that
a build places the binary in the root.

* Updated build to use make.

This commit updates the build to use make so there is one way to build
things.

* Updated build docs.

This commit updates the build docs to use the one true way to build this
repository.
  • Loading branch information
betterengineering authored Dec 23, 2021
1 parent ce90198 commit bf47935
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
run: brew install webp

- name: Build & test
run: go build . && go test ./...
run: make build && make test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ examples/*.webp
examples/*.gif

# Pixlet Binary
build/out/pixlet
pixlet
4 changes: 2 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Steps
```console
cd pixlet
```
- Build the following directories in order: `/render`, then `/runtime`, then `/encode` and finally `/`:
- Build the binary:
```console
go build render runtime encode .
make build
```
- After that you will have the binary `/pixlet`, which you should copy to your path.

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ test:
go test -v -cover ./...

clean:
rm -rf build/out
rm -f pixlet

bench:
go test -benchmem -benchtime=20s -bench BenchmarkRunAndRender tidbyt.dev/pixlet/encode

build: clean embedfonts
go build -o build/out/pixlet tidbyt.dev/pixlet
build: clean
go build -o pixlet tidbyt.dev/pixlet

embedfonts:
go run render/gen/embedfonts.go

0 comments on commit bf47935

Please sign in to comment.