Skip to content

Commit

Permalink
Merge pull request #126 from arnetheduck/makefile
Browse files Browse the repository at this point in the history
Add `Makefile` for rebuilding bindings
  • Loading branch information
mappu authored Jan 17, 2025
2 parents 422e81d + 0474d3f commit 501227d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/miqt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,15 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Linux64 docker build
run: docker build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile .


- name: Cache clang ASTs
uses: actions/cache@v4
with:
path: cmd/genbindings/cachedir
key: linux64-clang-cache

- name: Rebuild binding source
run: docker run -v ~/.cache/go-build:/root/.cache/go-build -v $PWD:/src -w /src miqt/genbindings:latest /bin/bash -c 'cd cmd/genbindings && go build && ./genbindings'
run: make

- name: Assert no changes
run: git update-index --really-refresh && git diff-index HEAD
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ examples/libraries/restricted-extras-qscintilla/restricted-extras-qscintilla
# android temporary build files
android-build
deployment-settings.json

*.docker-buildstamp
compile_flags.txt
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
BUILDSTAMPS = docker/genbindings.docker-buildstamp

all: genbindings

docker/genbindings.docker-buildstamp: docker/genbindings.Dockerfile
docker build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile .
touch $@

clean:
docker image rm -f miqt/genbindings:latest
rm -f $(BUILDSTAMPS)

genbindings: $(BUILDSTAMPS)
mkdir -p ~/.cache/go-build
docker run --user $$(id -u):$$(id -g) -v ~/.cache/go-build:/.cache/go-build -v $$PWD:/src -w /src miqt/genbindings:latest /bin/bash -c 'cd cmd/genbindings && go build && ./genbindings'

.PHONY : all clean genbindings

0 comments on commit 501227d

Please sign in to comment.