diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b27449e..adec963 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: timeout-minutes: 10 strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/jemalloc.yml b/.github/workflows/jemalloc.yml index 4963106..60f6697 100644 --- a/.github/workflows/jemalloc.yml +++ b/.github/workflows/jemalloc.yml @@ -33,8 +33,6 @@ jobs: include: - alias: linux os: ubuntu-latest - - alias: macos - os: macos-latest runs-on: ${{ matrix.os }} needs: version diff --git a/.github/workflows/mupdf.yml b/.github/workflows/mupdf.yml index 5f67427..49ba24c 100644 --- a/.github/workflows/mupdf.yml +++ b/.github/workflows/mupdf.yml @@ -33,8 +33,6 @@ jobs: include: - alias: linux os: ubuntu-latest - - alias: macos - os: macos-latest runs-on: ${{ matrix.os }} needs: version diff --git a/README.md b/README.md index b5674ac..18487c1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # LazyPDF -This is a rasterizing engine for PDF documents built around [MuPDF][mupdf] and [jemalloc][jemalloc]. Works on Linux and macOS. +This is a rasterizing engine for PDF documents built around [MuPDF][mupdf] and [jemalloc][jemalloc]. @@ -17,6 +17,12 @@ go build go test -race ``` +## Working with macOS +Unfortunately this repository does not supports macOS. In order to run and test the code on macOS, run the code inside a Docker container: +```shell +docker run --rm -it --platform linux/amd64 -v ${PWD}:/code -w /code golang:1.22.3 +``` + ## Updating the native libraries To update MuPDF or jemalloc simply change its version at `misc/{library}/version` and submit the change at a pull request. GitHub Actions will then trigger the process of updating the library and headers through a series of commits at the pull request branch. diff --git a/main.go b/main.go index bb7481e..e9a4cec 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,6 @@ package lazypdf /* #cgo CFLAGS: -I ${SRCDIR}/misc/mupdf/include -I ${SRCDIR}/misc/mupdf/include/mupdf -I ${SRCDIR}/misc/jemalloc/include -I ${SRCDIR}/misc/jemalloc/include/jemalloc -#cgo darwin,amd64 LDFLAGS: -L ${SRCDIR}/misc/mupdf/lib/x86-64-macos -lmupdf -lmupdf-third -L ${SRCDIR}/misc/jemalloc/lib/x86-64-macos -ljemalloc #cgo linux,amd64 LDFLAGS: -L ${SRCDIR}/misc/mupdf/lib/x86-64-linux -lmupdf -lmupdf-third -L ${SRCDIR}/misc/jemalloc/lib/x86-64-linux -ljemalloc -lm -lpthread -ldl #include #include "main.h" diff --git a/misc/jemalloc/lib/x86-64-macos/libjemalloc.a b/misc/jemalloc/lib/x86-64-macos/libjemalloc.a deleted file mode 100644 index 929310e..0000000 Binary files a/misc/jemalloc/lib/x86-64-macos/libjemalloc.a and /dev/null differ diff --git a/misc/mupdf/lib/x86-64-macos/libmupdf-third.a b/misc/mupdf/lib/x86-64-macos/libmupdf-third.a deleted file mode 100644 index c652d97..0000000 Binary files a/misc/mupdf/lib/x86-64-macos/libmupdf-third.a and /dev/null differ diff --git a/misc/mupdf/lib/x86-64-macos/libmupdf.a b/misc/mupdf/lib/x86-64-macos/libmupdf.a deleted file mode 100644 index 6213634..0000000 Binary files a/misc/mupdf/lib/x86-64-macos/libmupdf.a and /dev/null differ