Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tdewolff committed May 21, 2024
1 parent 6dbae63 commit 44346e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: NodeJS
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux_2_28_i686
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64
CIBW_BEFORE_ALL: .ci/ensure-go.sh; cd bindings/py; go build -buildmode=c-shared -o src/minify/minify.so
CIBW_BEFORE_ALL: .ci/ensure-go.sh; make -C bindings/py compile
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -61,14 +61,15 @@ jobs:
go-version: '>=1.17'
- name: Build Windows extension
run: |
cd bindings/py
#cd bindings/py
set GOOS=windows
set GOARCH=${{ matrix.go_target }}
set CGO_ENABLED=1
#go get github.com/tdewolff/minify/v2@${{ github.ref_name }}
#go mod init github.com/tdewolff/minify/bindings/js
#go mod tidy
go build -buildmode=c-shared -o src/minify/minify.so
#go build -buildmode=c-shared -o src/minify/minify.so
make -C bindings/py compile
- name: Build wheels
uses: pypa/[email protected]
with:
Expand Down Expand Up @@ -97,15 +98,16 @@ jobs:
go-version: '>=1.17'
- name: Build MacOS extension
run: |
cd bindings/py
#cd bindings/py
export GOOS=darwin
export GOARCH=${{ matrix.go_target }}
export CGO_ENABLED=1
export MACOSX_DEPLOYMENT_TARGET=10.9
#go get github.com/tdewolff/minify/v2@${{ github.ref_name }}
#go mod init github.com/tdewolff/minify/bindings/js
#go mod tidy
go build -buildmode=c-shared -o src/minify/minify.so
#go build -buildmode=c-shared -o src/minify/minify.so
make -C bindings/py compile
- name: Build wheels
uses: pypa/[email protected]
with:
Expand Down
11 changes: 7 additions & 4 deletions bindings/py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ VERSION=`git describe --tags --abbrev=0`

all: build

build: *.go MANIFEST.in
#go mod init
#go get github.com/tdewolff/minify/v2@${VERSION}
compile:
# called from workflow
sed -i.bak -e "s/\{VERSION\}/${VERSION}/" setup.py
go build -buildmode=c-shared -o src/minify/minify.so

build: compile
#go mod init
#go get github.com/tdewolff/minify/v2@${VERSION}
python -m build --sdist

publish: clean build
Expand All @@ -18,5 +21,5 @@ clean:
rm -rf tdewolff_minify.egg-info
rm -rf go.*

.PHONY: all build publish clean
.PHONY: all compile build publish clean

0 comments on commit 44346e1

Please sign in to comment.