From 93e255046ca8b63827a85ac3d7a861ea246a50d4 Mon Sep 17 00:00:00 2001 From: Nicolas MARTEAU Date: Mon, 29 Jul 2024 11:52:01 +0200 Subject: [PATCH] feat: improve .yml to copy windows .dll files in the tarball --- .github/Dockerfile | 1 - .github/workflows/build.yml | 35 ++++++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/Dockerfile b/.github/Dockerfile index c76e183..e9bd588 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -1,5 +1,4 @@ ARG PLATFORM -ARG ARCH FROM myunisoft91/heif-converter.$PLATFORM:v0.0.1 LABEL maintainer="Nicolas Marteau " diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 898c87d..8ffeeb5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,14 +14,14 @@ jobs: strategy: matrix: include: - - os: ubuntu-22.04 - platform: linuxmusl-x64 - - os: ubuntu-22.04 - platform: linux-x64 + # - os: ubuntu-22.04 + # platform: linuxmusl-x64 + # - os: ubuntu-22.04 + # platform: linux-x64 # - os: macos-11 # platform: darwin-x64 - - os: windows-latest - platform: win32-x64 + # - os: windows-latest + # platform: win32-x64 - os: windows-latest platform: win32-ia32 @@ -40,7 +40,7 @@ jobs: - name: Create a folder for the tarball run: mkdir release - - name: Build with Docker (Windows) + - name: Build and run Docker container if: contains(matrix.os, 'ubuntu') || contains(matrix.os, 'windows') run: | # Build image @@ -48,12 +48,25 @@ jobs: # Run container and copy the built file docker run --name ${{ matrix.PLATFORM }} ${{ matrix.PLATFORM }} - - # Copy binary file from container + + # Copy .node file from the container docker cp ${{ matrix.PLATFORM }}:/heif-converter/src/build/Release/converter.node ./release/converter.${{ matrix.PLATFORM }}.node + + # - name: Copy .dll files from the container (Windows) + # env: + # SRC_PATH: /heif-converter/src/build/Release + # if: contains(matrix.os, 'windows') + # run: | + # docker cp ${{ matrix.PLATFORM }}:${{ env.SRC_PATH }}/heif.dll ./release/heif.dll + # docker cp ${{ matrix.PLATFORM }}:${{ env.SRC_PATH }}/turbojpeg.dll ./release/turbojpeg.dll + # docker cp ${{ matrix.PLATFORM }}:${{ env.SRC_PATH }}/jpeg62.dll ./release/jpeg62.dll + # docker cp ${{ matrix.PLATFORM }}:${{ env.SRC_PATH }}/libde265.dll ./release/libde265.dll + # docker cp ${{ matrix.PLATFORM }}:${{ env.SRC_PATH }}/libx265.dll ./release/libx265.dll + # docker cp ${{ matrix.PLATFORM }}:${{ env.SRC_PATH }}/libpng16.dll ./release/libpng16.dll + # docker cp ${{ matrix.PLATFORM }}:${{ env.SRC_PATH }}/zlib1.dll ./release/zlib1.dll - # Clean up the Docker container - docker container rm ${{ matrix.PLATFORM }} + - name: Clean up the Docker container + run: docker container rm ${{ matrix.PLATFORM }} - name: Create tarball of the release folder run: |