Skip to content

chore(linuxmusl-x64): move Dockerfile in platform repository #5

chore(linuxmusl-x64): move Dockerfile in platform repository

chore(linuxmusl-x64): move Dockerfile in platform repository #5

Workflow file for this run

name: Build and Retrieve Compiled Files
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
platform: linuxmusl-x64
- os: ubuntu-22.04
platform: linux-x64
- os: macos-11
platform: darwin-x64
- os: windows-2020
platform: windows-x64
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Create a folder for the tarball
run: mkdir release
- name: Build with Docker (${{ matrix.platform }})
if: contains(matrix.os, 'ubuntu')
run: |
docker build --build-arg PLATFORM=${{ matrix.platform }} --build-arg LIBHEIF_V=v1.17.6 -t ${{ matrix.platform }} . -f ./platform/Dockerfile
docker run --name ${{ matrix.platform }} ${{ matrix.platform }}
docker cp ${{ matrix.platform }}:/heif-converter/src/build/Release/converter.node ./release/converter.${{ matrix.platform }}.node
docker container rm ${{ matrix.platform }}
# - name: Build natively (Windows)
# if: runner.os == 'Windows'
# run: |
# git clone https://github.com/microsoft/vcpkg.git
# .\vcpkg\bootstrap-vcpkg.bat
# .\vcpkg\vcpkg.exe install libheif
# echo "::add-path::$(pwd)\vcpkg\installed\x64-windows\bin"
# echo "::add-path::$(pwd)\vcpkg\installed\x64-windows\lib"
# npm install -g node-gyp
# node-gyp configure -C src
# node-gyp build -C src
# cp ./src/build/Release/converter.node ./src/build/Release/converter-windows-x64.node
- name: Create tarball of the release folder
run: |
cd ./release
tar -czf ${{ matrix.platform }}.tar.gz *
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: release
path: ./release/${{ matrix.platform }}.tar.gz