diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 56c1210e2..1580bd62b 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -9,19 +9,19 @@ on: branches: - master - dev - - 'release/**' - - 'ci/**' + - "release/**" + - "ci/**" pull_request: branches: - dev - - 'release/**' - - 'ci/**' + - "release/**" + - "ci/**" workflow_dispatch: inputs: target_branch: - description: 'Branch to make a release of' + description: "Branch to make a release of" required: true - default: 'master' + default: "master" # Dynamic name for the run run-name: > @@ -71,7 +71,7 @@ jobs: uses: ncipollo/release-action@v1 with: tag: v${{ steps.get_version.outputs.VERSION_TAG }} - name: 'Session ${{ steps.get_version.outputs.VERSION_TAG }}' + name: "Session ${{ steps.get_version.outputs.VERSION_TAG }}" draft: true # important to keep this, so we **NEVER** make a live release through the CI bodyFile: ${{ env.SHOULD_PUBLISH_ALPHA == 'true' && 'build/release-notes-alpha.md' || 'build/release-notes.md' }} allowUpdates: true @@ -81,47 +81,90 @@ jobs: omitBodyDuringUpdate: true omitNameDuringUpdate: true - build_linux: - runs-on: ubuntu-22.04 + build_recent_linux: + runs-on: ubuntu-latest + container: + image: ubuntu:25.10 + options: --user root + needs: [create_draft_release_if_needed] strategy: fail-fast: false matrix: - # `electron_target` needs to be a valid target of https://www.electron.build/linux#target include: - - identifier: deb - electron_target: deb - cache_suffix: linux-deb - is_qa: false - - identifier: rpm - electron_target: rpm - cache_suffix: linux-rpm - is_qa: false - - identifier: freebsd - electron_target: freebsd - cache_suffix: linux-freebsd - is_qa: false - - identifier: AppImage + - identifier: AppImage-recent electron_target: AppImage - cache_suffix: linux-AppImage + cache_suffix: linux-AppImage-recent is_qa: false - - identifier: deb-qa - electron_target: deb - cache_suffix: linux-deb - is_qa: true - name: '${{ matrix.identifier }}' + generate_release_metadata: false + # - identifier: deb + # electron_target: deb + # cache_suffix: linux-deb + # is_qa: false + # generate_release_metadata: true + # - identifier: rpm + # electron_target: rpm + # cache_suffix: linux-rpm + # is_qa: false + # generate_release_metadata: true + # - identifier: AppImage + # electron_target: AppImage + # cache_suffix: linux-AppImage + # is_qa: false + # generate_release_metadata: true + # - identifier: freebsd + # electron_target: freebsd + # cache_suffix: linux-freebsd + # is_qa: false + # generate_release_metadata: false + # Note: this deb-qa is currently broken. The deb and deb-qa are currently overwriting each others + # during build-release-publish and maybe the upload-artefact too. + # - identifier: deb-qa + # electron_target: deb + # cache_suffix: linux-deb + # is_qa: true + # generate_release_metadata: false + name: "${{ matrix.identifier }}" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PIP_BREAK_SYSTEM_PACKAGES: 1 steps: - - run: git config --global core.autocrlf false + - name: Install git and basic tools + run: | + apt update + apt install -q -y git cmake curl ca-certificates pkg-config build-essential libglib2.0-dev libexpat1-dev libx11-dev libxext-dev libexif-dev libxfixes-dev libxi-dev libxrender-dev libxrandr-dev libxinerama-dev libxcursor-dev libxtst-dev libturbojpeg0 libnss3 libasound2t64 libatk-bridge2.0-0 libgtk-3-0 libgbm1 meson curl libheif-dev libwebp-dev libcgif-dev libcgif0 libpng-dev libspng-dev libtiff-dev liblcms2-dev zlib1g-dev # libimagequant-dev cmake libfftw3-dev libopenexr-dev libgsf-1-dev libglib2.0-dev liborc-dev libopenslide-dev libmatio-dev libwebp-dev libjpeg-turbo8-dev libexpat1-dev libexif-dev libtiff5-dev libcfitsio-dev libpoppler-glib-dev librsvg2-dev libpango1.0-dev libopenjp2-7-dev liblcms2-dev libimagequant-dev + + - run: | + git config --global core.autocrlf false - name: Checkout git repo uses: actions/checkout@v4 with: ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} + - name: Build & install highway + run: | + cd /tmp + mkdir hwy + curl https://codeload.github.com/google/highway/tar.gz/refs/tags/1.3.0 | tar xzC /tmp/hwy --strip-components=1 + cd /tmp/hwy + CFLAGS="${CFLAGS} -O3" CXXFLAGS="${CXXFLAGS} -O3" cmake -G"Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=FALSE -DBUILD_TESTING=0 -DHWY_ENABLE_CONTRIB=0 -DHWY_ENABLE_EXAMPLES=0 -DHWY_ENABLE_TESTS=0 + make install/strip + + - name: Install libvips and rebuild 8.17.2 + run: | + cd /tmp + curl -O -L https://github.com/libvips/libvips/releases/download/v8.17.2/vips-8.17.2.tar.xz + tar xvf vips-8.17.2.tar.xz + cd vips-8.17.2 + meson setup build --prefix /usr --buildtype=release --strip -Ddeprecated=false -Dradiance=false -Dexamples=false -Dintrospection=disabled -Dmodules=disabled -Dcfitsio=disabled -Dfftw=disabled -Djpeg-xl=disabled --default-library static -Dwebp=enabled -Dcgif=enabled -Dexif=enabled -Djpeg=enabled -Dheif=enabled -Dpng=enabled -Dspng=enabled -Dtiff=enabled -Dzlib=enabled -Dlcms=enabled -Dimagequant=disabled -Dhighway=enabled -Dorc=disabled -Dmagick=disabled -Dmatio=disabled -Dnifti=disabled -Dopenexr=disabled -Dopenjpeg=disabled -Dopenslide=disabled -Dpdfium=disabled -Dpoppler=disabled -Dquantizr=disabled -Dppm=false -Danalyze=false -Dradiance=false -Dpangocairo=disabled -Dfontconfig=disabled -Drsvg=disabled + cd build + meson compile + meson test + meson install + - name: Custom build for QA if needed if: ${{ matrix.is_qa == true }} uses: ./actions/sed_for_qa @@ -155,195 +198,292 @@ jobs: with: upload_prefix: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.identifier }} - - name: Make release build & publish ${{ matrix.identifier }} - if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} - run: | - sed -i 's/"target": "deb"/"target": "${{ matrix.electron_target }}"/g' package.json && yarn build-release-publish - - - name: Backup release metadata - # only run this on "push" to "master" or alpha releases - # Note: The jobs are overwriting each other's latest-linux.yml. - # So, we upload all of them as artifacts, and then merge them (see `post_build_linux`) - # note: freebsd does not generate a latest-linux.yml file so we exclude it - if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' && matrix.identifier != 'freebsd' }} - shell: bash - run: | - mv dist/latest-linux.yml dist/latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml - - - name: Upload release metadata - # only run this on "push" to "master" or alpha releases - if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' && matrix.identifier != 'freebsd' }} - uses: actions/upload-artifact@v4 - with: - name: latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml - path: dist/latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml - - post_build_linux: - needs: [create_draft_release_if_needed, build_linux] - runs-on: ubuntu-22.04 - if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout git repo - uses: actions/checkout@v4 - # We only need a few files in this run, no point cloning everything - with: - sparse-checkout: | - package.json - build/setup-release-combine.sh - sparse-checkout-cone-mode: false - ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} - - - name: Download release metadata - uses: actions/download-artifact@v4 - with: - pattern: latest-linux-*-${{ github.sha }}.yml - path: dist - merge-multiple: true - - - name: Combine release metadata - run: | - ./build/setup-release-combine.sh ${{ github.sha }} linux - - - name: Upload changes to draft release - uses: ncipollo/release-action@v1 - with: - # the if at the job level checks that version_tag is not empty - tag: v${{ needs.create_draft_release_if_needed.outputs.version_tag }} - artifacts: 'dist/latest-linux.yml' - draft: true # important to keep this, so we **NEVER** make a live release through the CI - allowUpdates: true - omitNameDuringUpdate: true - omitBodyDuringUpdate: true - replacesArtifacts: true - updateOnlyUnreleased: true - makeLatest: false - - build_windows: - runs-on: windows-2022 - needs: [create_draft_release_if_needed] - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: 'windows x64' - steps: - - run: git config --global core.autocrlf false - - - name: Checkout git repo - uses: actions/checkout@v4 - with: - ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} - - - name: Setup & Build - uses: ./actions/setup_and_build - with: - cache_suffix: 'windows_x64' - - # we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform) - - name: Unit Test - run: yarn test - - - name: Make release build but do not publish - # always run this, except on "push" to "master" or alpha releases - if: ${{ needs.create_draft_release_if_needed.outputs.version_tag == '' }} - run: yarn build-release - - - name: Upload artefacts - # we do want this part to run only when version_tag is unset (i.e. we are not making a release) - if: ${{ needs.create_draft_release_if_needed.outputs.version_tag == '' }} - uses: ./actions/upload_prod_artefacts - with: - upload_prefix: ${{ runner.os }}-${{ runner.arch }} - - - name: Make release build & publish - if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} - run: yarn build-release-publish # No other args needed for windows publish - - # We want both arm64 and intel mac builds, and according to this https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources macos-14 and above is always arm64 and macos-13 is the last intel runner - # NOTE x64 builds made on an arm64 host will not bundle the native modules correctly https://github.com/electron-userland/electron-builder/issues/8646 - build_mac: - strategy: - matrix: - include: - - architecture: arm64 - cache_suffix: mac-arm64 - runner: macos-14 - - - architecture: x64 - cache_suffix: mac-x64 - runner: macos-13 - runs-on: ${{ matrix.runner }} - name: '${{ matrix.architecture }}' - - needs: [create_draft_release_if_needed] - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} - MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }} - SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }} - SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }} - SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }} - steps: - - run: git config --global core.autocrlf false - - - name: Checkout git repo - uses: actions/checkout@v4 - with: - ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} - - - name: Setup & Build - uses: ./actions/setup_and_build - with: - cache_suffix: ${{ matrix.cache_suffix }} - - # we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform) - - name: Unit Test - run: yarn test - - - name: Make release build ${{ matrix.architecture }} - uses: ./actions/make_release_build - with: - architecture: ${{ matrix.architecture }} - should_publish: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} - - post_build_mac: - needs: [create_draft_release_if_needed, build_mac] - runs-on: ubuntu-22.04 - if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout git repo - uses: actions/checkout@v4 - # We only need a few files in this run, no point cloning everything - with: - sparse-checkout: | - package.json - build/setup-release-combine.sh - sparse-checkout-cone-mode: false - ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} - - - name: Download release metadata - uses: actions/download-artifact@v4 - with: - pattern: latest-mac-*-${{ github.sha }}.yml - path: dist - merge-multiple: true - - - name: Combine release metadata - run: | - ./build/setup-release-combine.sh ${{ github.sha }} mac - - - name: Upload changes to draft release - uses: ncipollo/release-action@v1 - # the if at the job level checks that version_tag is not empty - with: - tag: v${{ needs.create_draft_release_if_needed.outputs.version_tag }} - artifacts: 'dist/latest-mac.yml' - draft: true # important to keep this, so we **NEVER** make a live release through the CI - allowUpdates: true - omitNameDuringUpdate: true - omitBodyDuringUpdate: true - replacesArtifacts: true - updateOnlyUnreleased: true - makeLatest: false + # - name: Make release build & publish ${{ matrix.identifier }} + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} + # run: | + # sed -i 's/"target": "deb"/"target": "${{ matrix.electron_target }}"/g' package.json && yarn build-release-publish + + # - name: Backup release metadata + # # only run this on "push" to "master" or alpha releases + # # Note: The jobs are overwriting each other's latest-linux.yml. + # # So, we upload all of them as artifacts, and then merge them (see `post_build_linux`) + # # note: freebsd does not generate a latest-linux.yml file so we exclude it, same for the deb-qa build + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' && matrix.generate_release_metadata == true }} + # shell: bash + # run: | + # mv dist/latest-linux.yml dist/latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml + + # - name: Upload release metadata + # # only run this on "push" to "master" or alpha releases + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' && matrix.generate_release_metadata == true }} + # uses: actions/upload-artifact@v4 + # with: + # name: latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml + # path: dist/latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml + + # build_linux: + # runs-on: ubuntu-22.04 + # needs: [create_draft_release_if_needed] + # strategy: + # fail-fast: false + # matrix: + # # `electron_target` needs to be a valid target of https://www.electron.build/linux#target + # include: + # - identifier: deb + # electron_target: deb + # cache_suffix: linux-deb + # is_qa: false + # - identifier: rpm + # electron_target: rpm + # cache_suffix: linux-rpm + # is_qa: false + # - identifier: freebsd + # electron_target: freebsd + # cache_suffix: linux-freebsd + # is_qa: false + # - identifier: AppImage + # electron_target: AppImage + # cache_suffix: linux-AppImage + # is_qa: false + # - identifier: deb-qa + # electron_target: deb + # cache_suffix: linux-deb + # is_qa: true + # name: "${{ matrix.identifier }}" + + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # steps: + # - run: git config --global core.autocrlf false + + # - name: Checkout git repo + # uses: actions/checkout@v4 + # with: + # ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} + + # - name: Custom build for QA if needed + # if: ${{ matrix.is_qa == true }} + # uses: ./actions/sed_for_qa + + # - name: Setup & Build + # uses: ./actions/setup_and_build + # with: + # cache_suffix: ${{ matrix.cache_suffix }} + + # - name: Lint Files + # # no need to lint files on all platforms + # run: yarn lint + + # - name: Enforce yarn.lock has no duplicates + # uses: ./actions/deduplicate_fail + + # # we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform) + # - name: Unit Test + # run: yarn test + + # - name: Make release build but do not publish ${{ matrix.identifier }} + # # we do want this part to run only when version_tag is unset (i.e. we are not making a release) + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag == '' }} + # run: | + # sed -i 's/"target": "deb"/"target": "${{ matrix.electron_target }}"/g' package.json && yarn build-release + + # - name: Upload artefacts ${{ matrix.identifier }} + # # we do want this part to run only when version_tag is unset (i.e. we are not making a release) + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag == '' }} + # uses: ./actions/upload_prod_artefacts + # with: + # upload_prefix: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.identifier }} + + # - name: Make release build & publish ${{ matrix.identifier }} + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} + # run: | + # sed -i 's/"target": "deb"/"target": "${{ matrix.electron_target }}"/g' package.json && yarn build-release-publish + + # - name: Backup release metadata + # # only run this on "push" to "master" or alpha releases + # # Note: The jobs are overwriting each other's latest-linux.yml. + # # So, we upload all of them as artifacts, and then merge them (see `post_build_linux`) + # # note: freebsd does not generate a latest-linux.yml file so we exclude it + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' && matrix.identifier != 'freebsd' }} + # shell: bash + # run: | + # mv dist/latest-linux.yml dist/latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml + + # - name: Upload release metadata + # # only run this on "push" to "master" or alpha releases + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' && matrix.identifier != 'freebsd' }} + # uses: actions/upload-artifact@v4 + # with: + # name: latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml + # path: dist/latest-linux-${{ matrix.electron_target }}-${{ github.sha }}.yml + + # post_build_linux: + # needs: [create_draft_release_if_needed, build_linux, build_recent_linux] + # runs-on: ubuntu-22.04 + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # steps: + # - name: Checkout git repo + # uses: actions/checkout@v4 + # # We only need a few files in this run, no point cloning everything + # with: + # sparse-checkout: | + # package.json + # build/setup-release-combine.sh + # sparse-checkout-cone-mode: false + # ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} + + # - name: Download release metadata + # uses: actions/download-artifact@v4 + # with: + # pattern: latest-linux-*-${{ github.sha }}.yml + # path: dist + # merge-multiple: true + + # - name: Combine release metadata + # run: | + # ./build/setup-release-combine.sh ${{ github.sha }} linux + + # - name: Upload changes to draft release + # uses: ncipollo/release-action@v1 + # with: + # # the if at the job level checks that version_tag is not empty + # tag: v${{ needs.create_draft_release_if_needed.outputs.version_tag }} + # artifacts: "dist/latest-linux.yml" + # draft: true # important to keep this, so we **NEVER** make a live release through the CI + # allowUpdates: true + # omitNameDuringUpdate: true + # omitBodyDuringUpdate: true + # replacesArtifacts: true + # updateOnlyUnreleased: true + # makeLatest: false + + # build_windows: + # runs-on: windows-2022 + # needs: [create_draft_release_if_needed] + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # name: "windows x64" + # steps: + # - run: git config --global core.autocrlf false + + # - name: Checkout git repo + # uses: actions/checkout@v4 + # with: + # ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} + + # - name: Setup & Build + # uses: ./actions/setup_and_build + # with: + # cache_suffix: "windows_x64" + + # # we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform) + # - name: Unit Test + # run: yarn test + + # - name: Make release build but do not publish + # # always run this, except on "push" to "master" or alpha releases + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag == '' }} + # run: yarn build-release + + # - name: Upload artefacts + # # we do want this part to run only when version_tag is unset (i.e. we are not making a release) + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag == '' }} + # uses: ./actions/upload_prod_artefacts + # with: + # upload_prefix: ${{ runner.os }}-${{ runner.arch }} + + # - name: Make release build & publish + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} + # run: yarn build-release-publish # No other args needed for windows publish + + # # We want both arm64 and intel mac builds, and according to this https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources macos-14 and above is always arm64 and macos-13 is the last intel runner + # # NOTE x64 builds made on an arm64 host will not bundle the native modules correctly https://github.com/electron-userland/electron-builder/issues/8646 + # build_mac: + # strategy: + # matrix: + # include: + # - architecture: arm64 + # cache_suffix: mac-arm64 + # runner: macos-14 + + # - architecture: x64 + # cache_suffix: mac-x64 + # runner: macos-13 + # runs-on: ${{ matrix.runner }} + # name: "${{ matrix.architecture }}" + + # needs: [create_draft_release_if_needed] + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} + # MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }} + # SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }} + # SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }} + # SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }} + # steps: + # - run: git config --global core.autocrlf false + + # - name: Checkout git repo + # uses: actions/checkout@v4 + # with: + # ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} + + # - name: Setup & Build + # uses: ./actions/setup_and_build + # with: + # cache_suffix: ${{ matrix.cache_suffix }} + + # # we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform) + # - name: Unit Test + # run: yarn test + + # - name: Make release build ${{ matrix.architecture }} + # uses: ./actions/make_release_build + # with: + # architecture: ${{ matrix.architecture }} + # should_publish: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} + + # post_build_mac: + # needs: [create_draft_release_if_needed, build_mac] + # runs-on: ubuntu-22.04 + # if: ${{ needs.create_draft_release_if_needed.outputs.version_tag != '' }} + # env: + # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # steps: + # - name: Checkout git repo + # uses: actions/checkout@v4 + # # We only need a few files in this run, no point cloning everything + # with: + # sparse-checkout: | + # package.json + # build/setup-release-combine.sh + # sparse-checkout-cone-mode: false + # ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }} + + # - name: Download release metadata + # uses: actions/download-artifact@v4 + # with: + # pattern: latest-mac-*-${{ github.sha }}.yml + # path: dist + # merge-multiple: true + + # - name: Combine release metadata + # run: | + # ./build/setup-release-combine.sh ${{ github.sha }} mac + + # - name: Upload changes to draft release + # uses: ncipollo/release-action@v1 + # # the if at the job level checks that version_tag is not empty + # with: + # tag: v${{ needs.create_draft_release_if_needed.outputs.version_tag }} + # artifacts: "dist/latest-mac.yml" + # draft: true # important to keep this, so we **NEVER** make a live release through the CI + # allowUpdates: true + # omitNameDuringUpdate: true + # omitBodyDuringUpdate: true + # replacesArtifacts: true + # updateOnlyUnreleased: true + # makeLatest: false diff --git a/actions/setup_and_build/action.yml b/actions/setup_and_build/action.yml index 04ac8b58d..1891d1fc8 100644 --- a/actions/setup_and_build/action.yml +++ b/actions/setup_and_build/action.yml @@ -17,6 +17,10 @@ runs: with: python-version: '3.12' + - name: Install yarn + run: npm install -g yarn + shell: bash + - name: Install setuptools for python 3.12 shell: bash run: python -m pip install --upgrade pip setuptools diff --git a/build/postinstall.js b/build/postinstall.js new file mode 100644 index 000000000..3369f8c4e --- /dev/null +++ b/build/postinstall.js @@ -0,0 +1,18 @@ +if (process.platform === 'linux') { + const { execSync } = require('child_process'); + const sharpPath = require('path').join(__dirname, '../node_modules/sharp'); + + try { + process.chdir(sharpPath); + execSync('yarn install --build-from-source --force', { + stdio: 'inherit', + env: { + ...process.env, + SHARP_FORCE_GLOBAL_LIBVIPS: '1', + npm_config_build_from_source: 'true', + }, + }); + } catch (err) { + console.warn('Sharp rebuild failed:', err.message); + } +} diff --git a/package.json b/package.json index 75a033665..b78bce541 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "session-desktop", "productName": "Session", "description": "Private messaging from your desktop", - "version": "1.17.0", + "version": "1.17.1", "license": "GPL-3.0", "author": { "name": "Session Foundation", @@ -40,7 +40,7 @@ "build-release": "yarn build-release-base --publish=never --config.directories.output=release", "build-release-publish": "yarn build-release-base --publish=always", "ready": "yarn dedup --fail && yarn build && yarn lint && yarn test", - "postinstall": "yarn patch-package && yarn electron-builder install-app-deps", + "postinstall": "yarn patch-package && node build/postinstall.js && yarn electron-builder install-app-deps", "update-git-info": "node ./build/updateLocalConfig.js", "worker:utils": "webpack --config=./utils.worker.config.js", "worker:libsession": "rimraf --glob 'ts/webworker/workers/node/libsession/*.node' && webpack --config=./libsession.worker.config.js",