Skip to content

Commit

Permalink
ci: update build.yml to run on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Dafyh committed Aug 5, 2024
1 parent 03bc9df commit 018cce0
Show file tree
Hide file tree
Showing 23 changed files with 16,971 additions and 30 deletions.
46 changes: 17 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,21 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-22.04
platform: linuxmusl-x64
- os: ubuntu-22.04
platform: linux-x64
# - os: macos-12
# platform: darwin-x64
- os: windows-latest
platform: win32-x64
- os: windows-latest
platform: win32-ia32
# - os: ubuntu-22.04
# platform: linuxmusl-x64
# - os: ubuntu-22.04
# platform: linux-x64
- os: macos-12
platform: darwin-x64
# - os: windows-latest
# platform: win32-x64
# - os: windows-latest
# platform: win32-ia32

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install dependencies
run: npm install --omit=optional

- name: Create a folder for the tarball
run: |
mkdir release
Expand Down Expand Up @@ -106,23 +98,19 @@ jobs:
- name: Configure and Build on OSX
if: contains(matrix.os, 'mac')
run: |
# Install nasm (useful for vcpkg)
brew install nasm
# Install python setup tools
pip3 install setuptools
# Clone vcpkg and install libheif
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg install libheif
brew update
brew install llvm
brew link --force --overwrite llvm
brew install make
brew link --force --overwrite make
# Build project
npm install
npm run configure
npm run build
# Run tests
# npm run test
npm run test
# Copy .node in the release folder
cp ./src/build/Release/converter.node ./release/lib/converter.${{ matrix.PLATFORM }}.node
Expand Down
Binary file added platform/darwin-x64/include/.DS_Store
Binary file not shown.
Loading

0 comments on commit 018cce0

Please sign in to comment.