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 2, 2024
1 parent f948a55 commit 1e57075
Show file tree
Hide file tree
Showing 23 changed files with 16,967 additions and 22 deletions.
34 changes: 13 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ jobs:
- 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

- name: Create a folder for the tarball
run: |
mkdir release
Expand Down Expand Up @@ -71,23 +63,23 @@ 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
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
arch -x86_64 zsh
nvm use system
nvm cache clear
nvm uninstall 18
nvm install 18
nvm use 18
rm -rf ./node_modules/@myunisoft
# Build project
npm run configure
npm run build
yarn install
yarn run configure
yarn run build
# Run tests
# npm run test
yarn 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 1e57075

Please sign in to comment.