mirror of
https://github.com/mappu/miqt.git
synced 2025-01-20 21:50:38 +00:00
Add Makefile
for rebuilding bindings
Having a makefile is a nice little trick to re-run the binding generation code without having to copy-paste and/or remember the right docker incantations :)
This commit is contained in:
parent
3d864cdb7b
commit
da9349971c
7
.github/workflows/miqt.yml
vendored
7
.github/workflows/miqt.yml
vendored
@ -13,10 +13,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Linux64 docker build
|
|
||||||
run: docker build -t miqt/genbindings:latest -f docker/genbindings.Dockerfile .
|
|
||||||
|
|
||||||
- name: Cache clang ASTs
|
- name: Cache clang ASTs
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
@ -24,7 +21,7 @@ jobs:
|
|||||||
key: linux64-clang-cache
|
key: linux64-clang-cache
|
||||||
|
|
||||||
- name: Rebuild binding source
|
- 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
|
- name: Assert no changes
|
||||||
run: git update-index --really-refresh && git diff-index HEAD
|
run: git update-index --really-refresh && git diff-index HEAD
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -46,3 +46,6 @@ examples/libraries/restricted-extras-qscintilla/restricted-extras-qscintilla
|
|||||||
# android temporary build files
|
# android temporary build files
|
||||||
android-build
|
android-build
|
||||||
deployment-settings.json
|
deployment-settings.json
|
||||||
|
|
||||||
|
*.docker-buildstamp
|
||||||
|
compile_flags.txt
|
||||||
|
16
Makefile
Normal file
16
Makefile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
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)
|
||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user