Skip to content

Commit

Permalink
Remove support for macOS
Browse files Browse the repository at this point in the history
The macOS build is broken since the GitHub runners migrated from Intel
to Apple Silicon CPUs.

Issue: CW-608
  • Loading branch information
diegobernardes committed Jun 4, 2024
1 parent 6465982 commit d1cbdab
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/jemalloc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
include:
- alias: linux
os: ubuntu-latest
- alias: macos
os: macos-latest
runs-on: ${{ matrix.os }}
needs: version

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/mupdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
include:
- alias: linux
os: ubuntu-latest
- alias: macos
os: macos-latest
runs-on: ${{ matrix.os }}
needs: version

Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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].
<a target="_blank" href="https://icons8.com/icon/43610/copy">
<img src="misc/assets/icon.png" align="right" height="96px" width="96px" />
</a>
Expand All @@ -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.

Expand Down
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <jemalloc/jemalloc.h>
#include "main.h"
Expand Down
Binary file removed misc/jemalloc/lib/x86-64-macos/libjemalloc.a
Binary file not shown.
Binary file removed misc/mupdf/lib/x86-64-macos/libmupdf-third.a
Binary file not shown.
Binary file removed misc/mupdf/lib/x86-64-macos/libmupdf.a
Binary file not shown.

0 comments on commit d1cbdab

Please sign in to comment.