From 8f7957b49c98a4982ea3af36589c4d52a8aa6f72 Mon Sep 17 00:00:00 2001 From: talynone Date: Sun, 1 Mar 2026 00:34:04 -0800 Subject: [PATCH] Stick the sharp version for icon-gen so Windows 11 ARM runner build works --- .github/workflows/build.yml | 71 +++------ package.json | 19 ++- yarn.lock | 292 +----------------------------------- 3 files changed, 40 insertions(+), 342 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2210f46..5ed5748a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-latest, windows-latest] + os: [macos-latest, ubuntu-latest, windows-latest, windows-11-arm] # os: [windows-latest] steps: @@ -48,6 +48,7 @@ jobs: # This global ffmpeg is used for screenshots (see below) - uses: FedericoCarboni/setup-ffmpeg@v3 + if: matrix.os != 'windows-11-arm' with: ffmpeg-version: release # arm not yet supported on macos @@ -61,6 +62,7 @@ jobs: github-token: ${{ github.server_url == 'https://github.com' && github.token || '' }} - run: ffmpeg -version + if: matrix.os != 'windows-11-arm' # Because of timeout issue https://github.com/yarnpkg/yarn/issues/4890 - run: yarn install --immutable --network-timeout 1000000 @@ -89,10 +91,14 @@ jobs: yarn download-ffmpeg-darwin-x64 yarn download-ffmpeg-darwin-arm64 - - name: (Windows) Download ffmpeg - if: runner.os == 'Windows' + - name: (Windows x64) Download ffmpeg + if: matrix.os == 'windows-latest' run: yarn download-ffmpeg-win32-x64 + - name: (Windows ARM64) Download ffmpeg + if: matrix.os == 'windows-11-arm' + run: yarn download-ffmpeg-win32-arm64 + - name: (Linux) Download ffmpeg if: runner.os == 'Linux' run: yarn download-ffmpeg-linux-x64 @@ -126,7 +132,7 @@ jobs: if: runner.os == 'macOS' - run: node script/e2e.ts 'dist\win-unpacked\LosslessCut.exe' desktop screenshot.jpeg - if: runner.os == 'Windows' + if: matrix.os == 'windows-latest' - run: | export DISPLAY=:0 @@ -165,8 +171,14 @@ jobs: ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }} ACTIONS_RESULTS_URL: ${{ env.ACTIONS_RESULTS_URL }} run: | - yarn upload-artifacts dist/LosslessCut-win-x64.7z - yarn upload-artifacts --name screenshot-windows.jpeg screenshot.jpeg + yarn upload-artifacts dist/LosslessCut-win-${{ matrix.os == 'windows-11-arm' && 'arm64' || 'x64' }}.7z + + - name: (Windows x64) Upload screenshot + if: matrix.os == 'windows-latest' && env.is_tag == 'false' + env: + ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }} + ACTIONS_RESULTS_URL: ${{ env.ACTIONS_RESULTS_URL }} + run: yarn upload-artifacts --name screenshot-windows.jpeg screenshot.jpeg - name: (Linux) Upload artifacts if: runner.os == 'Linux' && env.is_tag == 'false' @@ -179,50 +191,3 @@ jobs: yarn upload-artifacts dist/LosslessCut-linux-x64.tar.bz2 yarn upload-artifacts --name screenshot-linux.jpeg screenshot.jpeg - release-win-arm64: - runs-on: windows-11-arm - timeout-minutes: 60 - - env: - is_tag: ${{ startsWith(github.ref, 'refs/tags/v') }} - - steps: - # Windows fix. See https://github.com/actions/checkout/issues/226 - - run: git config --global core.autocrlf false - - - uses: actions/checkout@v6 - - - uses: actions/setup-node@v6 - with: - node-version: 22 - cache: 'yarn' - - # Because of timeout issue https://github.com/yarnpkg/yarn/issues/4890 - - run: yarn install --immutable --network-timeout 1000000 - - - name: Download ffmpeg (Windows ARM64) - run: yarn download-ffmpeg-win32-arm64 - - - name: Build/release Electron app (Windows ARM64) - uses: samuelmeuli/action-electron-builder@v1 - with: - github_token: ${{ secrets.github_token }} - release: ${{ env.is_tag == 'true' }} - max_attempts: 1 - - # https://stackoverflow.com/questions/74774114/using-docker-buildx-github-action-cache-without-official-actions/77225313#77225313 - - name: Expose actions cache variables - uses: actions/github-script@v6 - with: - script: | - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']) - core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']) - - - name: Upload artifacts (Windows ARM64) - if: env.is_tag == 'false' - env: - ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }} - ACTIONS_RESULTS_URL: ${{ env.ACTIONS_RESULTS_URL }} - run: | - yarn upload-artifacts dist/LosslessCut-win-arm64.7z - diff --git a/package.json b/package.json index 5c999145..dcf58f8f 100644 --- a/package.json +++ b/package.json @@ -319,8 +319,18 @@ }, "win": { "target": [ - "7z", - "appx" + { + "arch": "x64", + "target": "7z" + }, + { + "arch": "x64", + "target": "appx" + }, + { + "arch": "arm64", + "target": "7z" + } ], "extraResources": [ { @@ -473,5 +483,8 @@ ] } }, + "resolutions": { + "icon-gen/sharp": "^0.34.5" + }, "packageManager": "yarn@4.11.0" -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index e2ab96fe..59d98022 100644 --- a/yarn.lock +++ b/yarn.lock @@ -774,7 +774,7 @@ __metadata: languageName: node linkType: hard -"@emnapi/runtime@npm:^1.2.0, @emnapi/runtime@npm:^1.7.0": +"@emnapi/runtime@npm:^1.7.0": version: 1.8.1 resolution: "@emnapi/runtime@npm:1.8.1" dependencies: @@ -1280,18 +1280,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-darwin-arm64@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-darwin-arm64@npm:0.33.5" - dependencies: - "@img/sharp-libvips-darwin-arm64": "npm:1.0.4" - dependenciesMeta: - "@img/sharp-libvips-darwin-arm64": - optional: true - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@img/sharp-darwin-arm64@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-darwin-arm64@npm:0.34.5" @@ -1304,18 +1292,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-darwin-x64@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-darwin-x64@npm:0.33.5" - dependencies: - "@img/sharp-libvips-darwin-x64": "npm:1.0.4" - dependenciesMeta: - "@img/sharp-libvips-darwin-x64": - optional: true - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@img/sharp-darwin-x64@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-darwin-x64@npm:0.34.5" @@ -1328,13 +1304,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-libvips-darwin-arm64@npm:1.0.4": - version: 1.0.4 - resolution: "@img/sharp-libvips-darwin-arm64@npm:1.0.4" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@img/sharp-libvips-darwin-arm64@npm:1.2.4": version: 1.2.4 resolution: "@img/sharp-libvips-darwin-arm64@npm:1.2.4" @@ -1342,13 +1311,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-libvips-darwin-x64@npm:1.0.4": - version: 1.0.4 - resolution: "@img/sharp-libvips-darwin-x64@npm:1.0.4" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@img/sharp-libvips-darwin-x64@npm:1.2.4": version: 1.2.4 resolution: "@img/sharp-libvips-darwin-x64@npm:1.2.4" @@ -1356,13 +1318,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-libvips-linux-arm64@npm:1.0.4": - version: 1.0.4 - resolution: "@img/sharp-libvips-linux-arm64@npm:1.0.4" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - "@img/sharp-libvips-linux-arm64@npm:1.2.4": version: 1.2.4 resolution: "@img/sharp-libvips-linux-arm64@npm:1.2.4" @@ -1370,13 +1325,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-libvips-linux-arm@npm:1.0.5": - version: 1.0.5 - resolution: "@img/sharp-libvips-linux-arm@npm:1.0.5" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - "@img/sharp-libvips-linux-arm@npm:1.2.4": version: 1.2.4 resolution: "@img/sharp-libvips-linux-arm@npm:1.2.4" @@ -1398,13 +1346,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-libvips-linux-s390x@npm:1.0.4": - version: 1.0.4 - resolution: "@img/sharp-libvips-linux-s390x@npm:1.0.4" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - "@img/sharp-libvips-linux-s390x@npm:1.2.4": version: 1.2.4 resolution: "@img/sharp-libvips-linux-s390x@npm:1.2.4" @@ -1412,13 +1353,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-libvips-linux-x64@npm:1.0.4": - version: 1.0.4 - resolution: "@img/sharp-libvips-linux-x64@npm:1.0.4" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - "@img/sharp-libvips-linux-x64@npm:1.2.4": version: 1.2.4 resolution: "@img/sharp-libvips-linux-x64@npm:1.2.4" @@ -1426,13 +1360,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-libvips-linuxmusl-arm64@npm:1.0.4": - version: 1.0.4 - resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.0.4" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - "@img/sharp-libvips-linuxmusl-arm64@npm:1.2.4": version: 1.2.4 resolution: "@img/sharp-libvips-linuxmusl-arm64@npm:1.2.4" @@ -1440,13 +1367,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-libvips-linuxmusl-x64@npm:1.0.4": - version: 1.0.4 - resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.0.4" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - "@img/sharp-libvips-linuxmusl-x64@npm:1.2.4": version: 1.2.4 resolution: "@img/sharp-libvips-linuxmusl-x64@npm:1.2.4" @@ -1454,18 +1374,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-arm64@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-linux-arm64@npm:0.33.5" - dependencies: - "@img/sharp-libvips-linux-arm64": "npm:1.0.4" - dependenciesMeta: - "@img/sharp-libvips-linux-arm64": - optional: true - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - "@img/sharp-linux-arm64@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-linux-arm64@npm:0.34.5" @@ -1478,18 +1386,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-arm@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-linux-arm@npm:0.33.5" - dependencies: - "@img/sharp-libvips-linux-arm": "npm:1.0.5" - dependenciesMeta: - "@img/sharp-libvips-linux-arm": - optional: true - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - "@img/sharp-linux-arm@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-linux-arm@npm:0.34.5" @@ -1526,18 +1422,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-s390x@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-linux-s390x@npm:0.33.5" - dependencies: - "@img/sharp-libvips-linux-s390x": "npm:1.0.4" - dependenciesMeta: - "@img/sharp-libvips-linux-s390x": - optional: true - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - "@img/sharp-linux-s390x@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-linux-s390x@npm:0.34.5" @@ -1550,18 +1434,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linux-x64@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-linux-x64@npm:0.33.5" - dependencies: - "@img/sharp-libvips-linux-x64": "npm:1.0.4" - dependenciesMeta: - "@img/sharp-libvips-linux-x64": - optional: true - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - "@img/sharp-linux-x64@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-linux-x64@npm:0.34.5" @@ -1574,18 +1446,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linuxmusl-arm64@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-linuxmusl-arm64@npm:0.33.5" - dependencies: - "@img/sharp-libvips-linuxmusl-arm64": "npm:1.0.4" - dependenciesMeta: - "@img/sharp-libvips-linuxmusl-arm64": - optional: true - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - "@img/sharp-linuxmusl-arm64@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-linuxmusl-arm64@npm:0.34.5" @@ -1598,18 +1458,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-linuxmusl-x64@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-linuxmusl-x64@npm:0.33.5" - dependencies: - "@img/sharp-libvips-linuxmusl-x64": "npm:1.0.4" - dependenciesMeta: - "@img/sharp-libvips-linuxmusl-x64": - optional: true - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - "@img/sharp-linuxmusl-x64@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-linuxmusl-x64@npm:0.34.5" @@ -1622,15 +1470,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-wasm32@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-wasm32@npm:0.33.5" - dependencies: - "@emnapi/runtime": "npm:^1.2.0" - conditions: cpu=wasm32 - languageName: node - linkType: hard - "@img/sharp-wasm32@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-wasm32@npm:0.34.5" @@ -1647,13 +1486,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-win32-ia32@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-win32-ia32@npm:0.33.5" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "@img/sharp-win32-ia32@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-win32-ia32@npm:0.34.5" @@ -1661,13 +1493,6 @@ __metadata: languageName: node linkType: hard -"@img/sharp-win32-x64@npm:0.33.5": - version: 0.33.5 - resolution: "@img/sharp-win32-x64@npm:0.33.5" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@img/sharp-win32-x64@npm:0.34.5": version: 0.34.5 resolution: "@img/sharp-win32-x64@npm:0.34.5" @@ -5594,13 +5419,6 @@ __metadata: languageName: node linkType: hard -"color-name@npm:^1.0.0, color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 - languageName: node - linkType: hard - "color-name@npm:^2.0.0": version: 2.1.0 resolution: "color-name@npm:2.1.0" @@ -5608,13 +5426,10 @@ __metadata: languageName: node linkType: hard -"color-string@npm:^1.9.0": - version: 1.9.0 - resolution: "color-string@npm:1.9.0" - dependencies: - color-name: "npm:^1.0.0" - simple-swizzle: "npm:^0.2.2" - checksum: 10/6e347b463aa8e40eb193d6ee21ef501c88dad9c20c4607f5394f3b3c4ce40d828c87a35ac4acdc94696d8dae00a04cb30f0bc73f001ccc812f1d58dccaf26591 +"color-name@npm:~1.1.4": + version: 1.1.4 + resolution: "color-name@npm:1.1.4" + checksum: 10/b0445859521eb4021cd0fb0cc1a75cecf67fceecae89b63f62b201cca8d345baf8b952c966862a9d9a2632987d4f6581f0ec8d957dfacece86f0a7919316f610 languageName: node linkType: hard @@ -5636,16 +5451,6 @@ __metadata: languageName: node linkType: hard -"color@npm:^4.2.3": - version: 4.2.3 - resolution: "color@npm:4.2.3" - dependencies: - color-convert: "npm:^2.0.1" - color-string: "npm:^1.9.0" - checksum: 10/b23f5e500a79ea22428db43d1a70642d983405c0dd1f95ef59dbdb9ba66afbb4773b334fa0b75bb10b0552fd7534c6b28d4db0a8b528f91975976e70973c0152 - languageName: node - linkType: hard - "color@npm:^5.0.2, color@npm:^5.0.3": version: 5.0.3 resolution: "color@npm:5.0.3" @@ -6107,7 +5912,7 @@ __metadata: languageName: node linkType: hard -"detect-libc@npm:^2.0.1, detect-libc@npm:^2.0.3, detect-libc@npm:^2.1.2": +"detect-libc@npm:^2.0.1, detect-libc@npm:^2.1.2": version: 2.1.2 resolution: "detect-libc@npm:2.1.2" checksum: 10/b736c8d97d5d46164c0d1bed53eb4e6a3b1d8530d460211e2d52f1c552875e706c58a5376854e4e54f8b828c9cada58c855288c968522eb93ac7696d65970766 @@ -8544,13 +8349,6 @@ __metadata: languageName: node linkType: hard -"is-arrayish@npm:^0.3.1": - version: 0.3.2 - resolution: "is-arrayish@npm:0.3.2" - checksum: 10/81a78d518ebd8b834523e25d102684ee0f7e98637136d3bdc93fd09636350fa06f1d8ca997ea28143d4d13cb1b69c0824f082db0ac13e1ab3311c10ffea60ade - languageName: node - linkType: hard - "is-async-function@npm:^2.0.0": version: 2.0.0 resolution: "is-async-function@npm:2.0.0" @@ -12242,75 +12040,6 @@ __metadata: languageName: node linkType: hard -"sharp@npm:^0.33.4": - version: 0.33.5 - resolution: "sharp@npm:0.33.5" - dependencies: - "@img/sharp-darwin-arm64": "npm:0.33.5" - "@img/sharp-darwin-x64": "npm:0.33.5" - "@img/sharp-libvips-darwin-arm64": "npm:1.0.4" - "@img/sharp-libvips-darwin-x64": "npm:1.0.4" - "@img/sharp-libvips-linux-arm": "npm:1.0.5" - "@img/sharp-libvips-linux-arm64": "npm:1.0.4" - "@img/sharp-libvips-linux-s390x": "npm:1.0.4" - "@img/sharp-libvips-linux-x64": "npm:1.0.4" - "@img/sharp-libvips-linuxmusl-arm64": "npm:1.0.4" - "@img/sharp-libvips-linuxmusl-x64": "npm:1.0.4" - "@img/sharp-linux-arm": "npm:0.33.5" - "@img/sharp-linux-arm64": "npm:0.33.5" - "@img/sharp-linux-s390x": "npm:0.33.5" - "@img/sharp-linux-x64": "npm:0.33.5" - "@img/sharp-linuxmusl-arm64": "npm:0.33.5" - "@img/sharp-linuxmusl-x64": "npm:0.33.5" - "@img/sharp-wasm32": "npm:0.33.5" - "@img/sharp-win32-ia32": "npm:0.33.5" - "@img/sharp-win32-x64": "npm:0.33.5" - color: "npm:^4.2.3" - detect-libc: "npm:^2.0.3" - semver: "npm:^7.6.3" - dependenciesMeta: - "@img/sharp-darwin-arm64": - optional: true - "@img/sharp-darwin-x64": - optional: true - "@img/sharp-libvips-darwin-arm64": - optional: true - "@img/sharp-libvips-darwin-x64": - optional: true - "@img/sharp-libvips-linux-arm": - optional: true - "@img/sharp-libvips-linux-arm64": - optional: true - "@img/sharp-libvips-linux-s390x": - optional: true - "@img/sharp-libvips-linux-x64": - optional: true - "@img/sharp-libvips-linuxmusl-arm64": - optional: true - "@img/sharp-libvips-linuxmusl-x64": - optional: true - "@img/sharp-linux-arm": - optional: true - "@img/sharp-linux-arm64": - optional: true - "@img/sharp-linux-s390x": - optional: true - "@img/sharp-linux-x64": - optional: true - "@img/sharp-linuxmusl-arm64": - optional: true - "@img/sharp-linuxmusl-x64": - optional: true - "@img/sharp-wasm32": - optional: true - "@img/sharp-win32-ia32": - optional: true - "@img/sharp-win32-x64": - optional: true - checksum: 10/9f153578cb02735359cbcc874f52b56b8074ed997498c35255c7099d4f4f506f6ddf83a437a55242c7ad4f979336660504b6c78e29d6933f4981dedbdae5ce09 - languageName: node - linkType: hard - "sharp@npm:^0.34.5": version: 0.34.5 resolution: "sharp@npm:0.34.5" @@ -12480,15 +12209,6 @@ __metadata: languageName: node linkType: hard -"simple-swizzle@npm:^0.2.2": - version: 0.2.2 - resolution: "simple-swizzle@npm:0.2.2" - dependencies: - is-arrayish: "npm:^0.3.1" - checksum: 10/c6dffff17aaa383dae7e5c056fbf10cf9855a9f79949f20ee225c04f06ddde56323600e0f3d6797e82d08d006e93761122527438ee9531620031c08c9e0d73cc - languageName: node - linkType: hard - "simple-update-notifier@npm:2.0.0": version: 2.0.0 resolution: "simple-update-notifier@npm:2.0.0"