Update action dependencies (#1724)

* CI: update various action versions

The most significant change is action/upload-artifact@v4,
which does not support uploading artifacts of the same name.
This makes our lives significantly worse, but I don't know
if GitHub will remove v3 in future or not.

* CI: fix macOS universal artifact download

* CI: update release action versions

* CI: use containers only for building

* CI: fix multiline commands

* CI: try to fix multiline strings again

* CI: fix multiline strings again ugh

* CI: Fix ccache in containers

* CI: Fix quotes again

* CI: fix ccache

* CI: fix deprecated set-output command

* ci: update build box to v2.1.2

* ci: revert to softprops/action-gh-release

* ci: add name to release

* ci: remove name again

* ci: fix wrong outputs reference

* ci: add name

* ci: add missing name for each step

* ci: format yaml files

* ci/release: add names to unamed entries

* ci/release: fix MSYS2 not downloading deps

* ci/release: change to ncipollo/release-action

There is some weird issue with softprops/action-gh-release and I can't update an existing release.

* ci/release: allow updating releases

* ci/release: upload all artifacts, then download them at once

* ci/release: use a better name for job

* ci/release: add release as dependency

* ci/release: set tag for update release

* ci/auto-labeler: remove workaround for old autolabeler issue

* ci/release: remove the need of another bash -c

* ci/release: remove weird bash -c
This commit is contained in:
Takase 2024-06-07 10:08:12 +08:00 committed by GitHub
parent 490f627f38
commit a17c7cfcd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 257 additions and 133 deletions

View File

@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Apply Type Label - name: Apply Type Label
uses: actions/labeler@v3 uses: actions/labeler@v5
with: with:
repo-token: "${{ secrets.GITHUB_TOKEN }}" repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: "" # works around actions/labeler#104 sync-labels: false

View File

@ -3,11 +3,11 @@ name: CI
on: on:
push: push:
branches: branches:
- '*' - "*"
pull_request: pull_request:
branches: branches:
- '*' - "*"
workflow_dispatch: workflow_dispatch:
@ -23,6 +23,7 @@ jobs:
env: env:
CC: ${{ matrix.config.cc }} CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }} CXX: ${{ matrix.config.cxx }}
steps: steps:
- name: Set Environment Variables - name: Set Environment Variables
if: ${{ matrix.config.cc == 'gcc' }} if: ${{ matrix.config.cc == 'gcc' }}
@ -30,28 +31,37 @@ jobs:
echo "$HOME/.local/bin" >> "$GITHUB_PATH" echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV" echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-linux-$(uname -m)-portable" >> "$GITHUB_ENV" echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-linux-$(uname -m)-portable" >> "$GITHUB_ENV"
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4
- name: Python Setup - name: Python Setup
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: 3.9 python-version: "3.11"
- name: Update Packages - name: Update Packages
run: sudo apt-get update run: sudo apt-get update
- name: Install Dependencies - name: Install Dependencies
run: bash scripts/install-dependencies.sh --debug run: bash scripts/install-dependencies.sh --debug
- name: Build - name: Build
run: | run: |
bash --version bash --version
bash scripts/build.sh --debug --forcefallback --portable bash scripts/build.sh --debug --forcefallback --portable
- name: Package - name: Package
if: ${{ matrix.config.cc == 'gcc' }} if: ${{ matrix.config.cc == 'gcc' }}
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
if: ${{ matrix.config.cc == 'gcc' }} if: ${{ matrix.config.cc == 'gcc' }}
with: with:
name: Linux Artifacts name: Linux Artifacts
path: ${{ env.INSTALL_NAME }}.tar.gz path: ${{ env.INSTALL_NAME }}.tar.gz
compression-level: 0
build_macos: build_macos:
name: macOS name: macOS
@ -61,7 +71,8 @@ jobs:
CXX: clang++ CXX: clang++
strategy: strategy:
matrix: matrix:
arch: ['x86_64', 'arm64'] arch: ["x86_64", "arm64"]
steps: steps:
- name: System Information - name: System Information
run: | run: |
@ -69,36 +80,46 @@ jobs:
bash --version bash --version
gcc -v gcc -v
xcodebuild -version xcodebuild -version
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH" echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV" echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-macos-${{ matrix.arch }}" >> "$GITHUB_ENV" echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-macos-${{ matrix.arch }}" >> "$GITHUB_ENV"
if [[ $(uname -m) != ${{ matrix.arch }} ]]; then echo "ARCH=--cross-arch ${{ matrix.arch }}" >> "$GITHUB_ENV"; fi if [[ $(uname -m) != ${{ matrix.arch }} ]]; then echo "ARCH=--cross-arch ${{ matrix.arch }}" >> "$GITHUB_ENV"; fi
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4
- name: Python Setup - name: Python Setup
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: 3.9 python-version: "3.11"
- name: Install Dependencies
# --lhelper will eliminate a warning with arm64 and libusb # --lhelper will eliminate a warning with arm64 and libusb
- name: Install Dependencies
run: bash scripts/install-dependencies.sh --debug --lhelper run: bash scripts/install-dependencies.sh --debug --lhelper
- name: Build - name: Build
run: | run: |
bash --version bash --version
bash scripts/build.sh --bundle --debug --forcefallback $ARCH bash scripts/build.sh --bundle --debug --forcefallback $ARCH
- name: Create DMG Image - name: Create DMG Image
run: bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --dmg run: bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --dmg
- name: Upload DMG Image - name: Upload DMG Image
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: macOS DMG Images name: macOS DMG Images (${{ matrix.arch }})
path: ${{ env.INSTALL_NAME }}.dmg path: ${{ env.INSTALL_NAME }}.dmg
compression-level: 0
build_macos_universal: build_macos_universal:
name: macOS (Universal) name: macOS (Universal)
runs-on: macos-11 runs-on: macos-11
needs: build_macos needs: build_macos
steps: steps:
- name: System Information - name: System Information
run: | run: |
@ -106,32 +127,42 @@ jobs:
bash --version bash --version
gcc -v gcc -v
xcodebuild -version xcodebuild -version
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH" echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-macos-universal" >> "$GITHUB_ENV" echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-macos-universal" >> "$GITHUB_ENV"
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: "3.11"
- name: Install dmgbuild - name: Install dmgbuild
run: pip install dmgbuild run: pip install dmgbuild
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
id: download id: download
with: with:
name: macOS DMG Images pattern: macOS DMG Images *
merge-multiple: true
path: dmgs-original path: dmgs-original
- name: Make universal bundles - name: Make universal bundles
run: | run: |
bash --version bash --version
bash scripts/make-universal-binaries.sh ${{ steps.download.outputs.download-path }} "${INSTALL_NAME}" bash scripts/make-universal-binaries.sh ${{ steps.download.outputs.download-path }} "${INSTALL_NAME}"
- name: Upload DMG Image - name: Upload DMG Image
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: macOS Universal DMG Images name: macOS DMG Images (Universal)
path: ${{ env.INSTALL_NAME }}.dmg path: ${{ env.INSTALL_NAME }}.dmg
compression-level: 0
build_windows_msys2: build_windows_msys2:
name: Windows name: Windows
@ -139,14 +170,18 @@ jobs:
strategy: strategy:
matrix: matrix:
config: config:
- {msystem: MINGW32, arch: i686} - { msystem: MINGW32, arch: i686 }
- {msystem: MINGW64, arch: x86_64} - { msystem: MINGW64, arch: x86_64 }
defaults: defaults:
run: run:
shell: msys2 {0} shell: msys2 {0}
steps: steps:
- uses: actions/checkout@v3 - name: Checkout code
- uses: msys2/setup-msys2@v2 uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with: with:
msystem: ${{ matrix.config.msystem }} msystem: ${{ matrix.config.msystem }}
install: >- install: >-
@ -158,6 +193,7 @@ jobs:
mingw-w64-${{ matrix.config.arch }}-ninja mingw-w64-${{ matrix.config.arch }}-ninja
mingw-w64-${{ matrix.config.arch }}-ca-certificates mingw-w64-${{ matrix.config.arch }}-ca-certificates
mingw-w64-${{ matrix.config.arch }}-ntldd mingw-w64-${{ matrix.config.arch }}-ntldd
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH" echo "$HOME/.local/bin" >> "$GITHUB_PATH"
@ -167,20 +203,25 @@ jobs:
else else
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-windows-i686" >> "$GITHUB_ENV" echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-windows-i686" >> "$GITHUB_ENV"
fi fi
- name: Install Dependencies - name: Install Dependencies
if: false if: false
run: bash scripts/install-dependencies.sh --debug run: bash scripts/install-dependencies.sh --debug
- name: Build - name: Build
run: | run: |
bash --version bash --version
bash scripts/build.sh -U --debug --forcefallback bash scripts/build.sh -U --debug --forcefallback
- name: Package - name: Package
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: Windows Artifacts name: Windows Artifacts (${{ matrix.config.msystem }})
path: ${{ env.INSTALL_NAME }}.zip path: ${{ env.INSTALL_NAME }}.zip
compression-level: 0
build_windows_msvc: build_windows_msvc:
name: Windows (MSVC) name: Windows (MSVC)
@ -190,38 +231,52 @@ jobs:
arch: arch:
- { target: x86, name: i686 } - { target: x86, name: i686 }
- { target: x64, name: x86_64 } - { target: x64, name: x86_64 }
steps: steps:
- uses: actions/checkout@v3 - name: Checkout code
- uses: ilammy/msvc-dev-cmd@v1 uses: actions/checkout@v4
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@v1
with: with:
arch: ${{ matrix.arch.target }} arch: ${{ matrix.arch.target }}
- uses: actions/setup-python@v4
- name: Setup Python
uses: actions/setup-python@v5
with: with:
python-version: '3.x' python-version: "3.11"
- name: Install meson and ninja - name: Install meson and ninja
run: pip install meson ninja run: pip install meson ninja
- name: Set up environment variables - name: Set up environment variables
run: | run: |
"INSTALL_NAME=lite-xl-$($env:GITHUB_REF -replace ".*/")-windows-msvc-${{ matrix.arch.name }}" >> $env:GITHUB_ENV "INSTALL_NAME=lite-xl-$($env:GITHUB_REF -replace ".*/")-windows-msvc-${{ matrix.arch.name }}" >> $env:GITHUB_ENV
"INSTALL_REF=$($env:GITHUB_REF -replace ".*/")" >> $env:GITHUB_ENV "INSTALL_REF=$($env:GITHUB_REF -replace ".*/")" >> $env:GITHUB_ENV
"LUA_SUBPROJECT_PATH=subprojects/$(awk -F ' *= *' '/directory/ { printf $2 }' subprojects/lua.wrap)" >> $env:GITHUB_ENV "LUA_SUBPROJECT_PATH=subprojects/$(awk -F ' *= *' '/directory/ { printf $2 }' subprojects/lua.wrap)" >> $env:GITHUB_ENV
- name: Download and patch subprojects - name: Download and patch subprojects
shell: bash shell: bash
run: | run: |
meson subprojects download meson subprojects download
cat resources/windows/001-lua-unicode.diff | patch -Np1 -d "$LUA_SUBPROJECT_PATH" cat resources/windows/001-lua-unicode.diff | patch -Np1 -d "$LUA_SUBPROJECT_PATH"
- name: Configure - name: Configure
run: | run: |
meson setup --wrap-mode=forcefallback build meson setup --wrap-mode=forcefallback build
- name: Build - name: Build
run: | run: |
meson install -C build --destdir="../lite-xl" meson install -C build --destdir="../lite-xl"
- name: Package - name: Package
run: | run: |
Remove-Item -Recurse -Force -Path "lite-xl/lib","lite-xl/include" Remove-Item -Recurse -Force -Path "lite-xl/lib","lite-xl/include"
Compress-Archive -Path lite-xl -DestinationPath "$env:INSTALL_NAME.zip" Compress-Archive -Path lite-xl -DestinationPath "$env:INSTALL_NAME.zip"
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: Windows Artifacts (MSVC) name: Windows Artifacts (MSVC ${{ matrix.arch.target }})
path: ${{ env.INSTALL_NAME }}.zip path: ${{ env.INSTALL_NAME }}.zip
compression-level: 0

View File

@ -21,57 +21,64 @@ jobs:
outputs: outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }} upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.tag.outputs.version }} version: ${{ steps.tag.outputs.version }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Fetch Version - name: Fetch Version
id: tag id: tag
run: | run: |
if [[ "${{ github.event.inputs.version }}" != "" ]]; then if [[ "${{ github.event.inputs.version }}" != "" ]]; then
echo ::set-output name=version::${{ github.event.inputs.version }} echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
else else
echo ::set-output name=version::${GITHUB_REF/refs\/tags\//} echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
fi fi
- name: Update Tag - name: Update Tag
uses: richardsimko/update-tag@v1 uses: richardsimko/update-tag@v1
with: with:
tag_name: ${{ steps.tag.outputs.version }} tag_name: ${{ steps.tag.outputs.version }}
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Release Notes - name: Generate Release Notes
run: bash scripts/generate-release-notes.sh --version ${{ steps.tag.outputs.version }} run: bash scripts/generate-release-notes.sh --version ${{ steps.tag.outputs.version }}
- name: Create Release - name: Create Release
id: create_release id: create_release
uses: softprops/action-gh-release@v1 uses: ncipollo/release-action@v1
with: with:
tag_name: ${{ steps.tag.outputs.version }}
name: Lite XL ${{ steps.tag.outputs.version }} name: Lite XL ${{ steps.tag.outputs.version }}
tag: ${{ steps.tag.outputs.version }}
draft: true draft: true
body_path: release-notes.md bodyFile: release-notes.md
generateReleaseNotes: true
allowUpdates: true
build_linux: build_linux:
name: Linux name: Linux
needs: release needs: release
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: ghcr.io/lite-xl/lite-xl-build-box:latest
env:
CC: gcc
CXX: g++
steps: steps:
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH" echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV" echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
- uses: actions/checkout@v3 echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
# disabled because this will break our own Python install # disabled because this will break our own Python install
- name: Python Setup - name: Python Setup
if: false if: false
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: 3.9 python-version: "3.11"
# disabled because the container has up-to-date packages # disabled because the container has up-to-date packages
- name: Update Packages - name: Update Packages
@ -86,23 +93,34 @@ jobs:
sudo apt-get install -y ccache sudo apt-get install -y ccache
- name: Build Portable - name: Build Portable
run: | uses: docker://ghcr.io/lite-xl/lite-xl-build-box:v2.2.0
with:
entrypoint: /entrypoint.sh
args: |
bash --version bash --version
bash scripts/build.sh --debug --forcefallback --portable --release bash scripts/build.sh --debug --forcefallback --portable --release
- name: Package Portables - name: Package Portables
run: | uses: docker://ghcr.io/lite-xl/lite-xl-build-box:v2.2.0
with:
entrypoint: /entrypoint.sh
args: |
bash scripts/package.sh --version ${INSTALL_REF} --debug --binary --release bash scripts/package.sh --version ${INSTALL_REF} --debug --binary --release
bash scripts/package.sh --version ${INSTALL_REF} --debug --addons --binary --release bash scripts/package.sh --version ${INSTALL_REF} --debug --addons --binary --release
- name: Build AppImages - name: Build AppImages
run: | uses: docker://ghcr.io/lite-xl/lite-xl-build-box:v2.2.0
with:
entrypoint: /entrypoint.sh
args: |
bash scripts/appimage.sh --debug --static --version ${INSTALL_REF} --release bash scripts/appimage.sh --debug --static --version ${INSTALL_REF} --release
bash scripts/appimage.sh --debug --nobuild --addons --version ${INSTALL_REF} bash scripts/appimage.sh --debug --nobuild --addons --version ${INSTALL_REF}
- name: Upload Files
uses: softprops/action-gh-release@v1 - name: Upload Artifacts
uses: actions/upload-artifact@v4
with: with:
tag_name: ${{ needs.release.outputs.version }} name: Linux Artifacts
draft: true path: |
files: |
lite-xl-${{ env.INSTALL_REF }}-linux-x86_64-portable.tar.gz lite-xl-${{ env.INSTALL_REF }}-linux-x86_64-portable.tar.gz
lite-xl-${{ env.INSTALL_REF }}-addons-linux-x86_64-portable.tar.gz lite-xl-${{ env.INSTALL_REF }}-addons-linux-x86_64-portable.tar.gz
LiteXL-${{ env.INSTALL_REF }}-x86_64.AppImage LiteXL-${{ env.INSTALL_REF }}-x86_64.AppImage
@ -118,6 +136,7 @@ jobs:
env: env:
CC: clang CC: clang
CXX: clang++ CXX: clang++
steps: steps:
- name: System Information - name: System Information
run: | run: |
@ -125,6 +144,7 @@ jobs:
bash --version bash --version
gcc -v gcc -v
xcodebuild -version xcodebuild -version
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH" echo "$HOME/.local/bin" >> "$GITHUB_PATH"
@ -132,41 +152,41 @@ jobs:
echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-macos-${{ matrix.arch }}" >> "$GITHUB_ENV" echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-macos-${{ matrix.arch }}" >> "$GITHUB_ENV"
echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-macos-${{ matrix.arch }}" >> "$GITHUB_ENV" echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-macos-${{ matrix.arch }}" >> "$GITHUB_ENV"
if [[ $(uname -m) != ${{ matrix.arch }} ]]; then echo "ARCH=--cross-arch ${{ matrix.arch }}" >> "$GITHUB_ENV"; fi if [[ $(uname -m) != ${{ matrix.arch }} ]]; then echo "ARCH=--cross-arch ${{ matrix.arch }}" >> "$GITHUB_ENV"; fi
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4
- name: Python Setup - name: Python Setup
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: 3.9 python-version: "3.11"
- name: Install Dependencies - name: Install Dependencies
run: bash scripts/install-dependencies.sh --debug run: bash scripts/install-dependencies.sh --debug
- name: Build - name: Build
run: | run: |
bash --version bash --version
bash scripts/build.sh --bundle --debug --forcefallback --release $ARCH bash scripts/build.sh --bundle --debug --forcefallback --release $ARCH
- name: Create DMG Image - name: Create DMG Image
run: | run: |
bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --dmg --release bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --dmg --release
bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --addons --dmg --release bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --addons --dmg --release
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: macOS DMG Images name: macOS DMG Images (${{ matrix.arch }})
path: | path: |
${{ env.INSTALL_NAME }}.dmg ${{ env.INSTALL_NAME }}.dmg
${{ env.INSTALL_NAME_ADDONS }}.dmg ${{ env.INSTALL_NAME_ADDONS }}.dmg
- name: Upload Files
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.release.outputs.version }}
draft: true
files: |
${{ env.INSTALL_NAME }}.dmg
${{ env.INSTALL_NAME_ADDONS }}.dmg
build_macos_universal: build_macos_universal:
name: macOS (Universal) name: macOS (Universal)
needs: [release, build_macos] needs: [release, build_macos]
runs-on: macos-11 runs-on: macos-11
steps: steps:
- name: System Information - name: System Information
run: | run: |
@ -174,40 +194,48 @@ jobs:
bash --version bash --version
gcc -v gcc -v
xcodebuild -version xcodebuild -version
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH" echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_BASE=lite-xl-${{ needs.release.outputs.version }}-macos" >> "$GITHUB_ENV" echo "INSTALL_BASE=lite-xl-${{ needs.release.outputs.version }}-macos" >> "$GITHUB_ENV"
echo "INSTALL_BASE_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-macos" >> "$GITHUB_ENV" echo "INSTALL_BASE_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-macos" >> "$GITHUB_ENV"
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Download Artifacts - name: Download Artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
id: download id: download
with: with:
name: macOS DMG Images pattern: macOS DMG Images *
merge-multiple: true
path: dmgs-original path: dmgs-original
- name: Python Setup - name: Python Setup
uses: actions/setup-python@v2 uses: actions/setup-python@v5
with: with:
python-version: 3.9 python-version: "3.11"
- name: Install dmgbuild - name: Install dmgbuild
run: pip install dmgbuild run: pip install dmgbuild
- name: Prepare DMG Images - name: Prepare DMG Images
run: | run: |
mkdir -p dmgs-addons dmgs-normal mkdir -p dmgs-addons dmgs-normal
mv -v "${{ steps.download.outputs.download-path }}/$INSTALL_BASE-"{x86_64,arm64}.dmg dmgs-normal mv -v "${{ steps.download.outputs.download-path }}/$INSTALL_BASE-"{x86_64,arm64}.dmg dmgs-normal
mv -v "${{ steps.download.outputs.download-path }}/$INSTALL_BASE_ADDONS-"{x86_64,arm64}.dmg dmgs-addons mv -v "${{ steps.download.outputs.download-path }}/$INSTALL_BASE_ADDONS-"{x86_64,arm64}.dmg dmgs-addons
- name: Create Universal DMGs - name: Create Universal DMGs
run: | run: |
bash --version bash --version
bash scripts/make-universal-binaries.sh dmgs-normal "$INSTALL_BASE-universal" bash scripts/make-universal-binaries.sh dmgs-normal "$INSTALL_BASE-universal"
bash scripts/make-universal-binaries.sh dmgs-addons "$INSTALL_BASE_ADDONS-universal" bash scripts/make-universal-binaries.sh dmgs-addons "$INSTALL_BASE_ADDONS-universal"
- name: Upload Files
uses: softprops/action-gh-release@v1 - name: Upload Artifacts
uses: actions/upload-artifact@v4
with: with:
tag_name: ${{ needs.release.outputs.version }} name: macOS DMG Images (Universal)
draft: true path: |
files: |
${{ env.INSTALL_BASE }}-universal.dmg ${{ env.INSTALL_BASE }}-universal.dmg
${{ env.INSTALL_BASE_ADDONS }}-universal.dmg ${{ env.INSTALL_BASE_ADDONS }}-universal.dmg
@ -217,54 +245,95 @@ jobs:
runs-on: windows-2019 runs-on: windows-2019
strategy: strategy:
matrix: matrix:
msystem: [MINGW32, MINGW64] config:
- { msystem: MINGW32, arch: i686 }
- { msystem: MINGW64, arch: x86_64 }
defaults: defaults:
run: run:
shell: msys2 {0} shell: msys2 {0}
steps: steps:
- uses: actions/checkout@v3 - name: Checkout code
- uses: msys2/setup-msys2@v2 uses: actions/checkout@v4
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with: with:
msystem: ${{ matrix.msystem }} msystem: ${{ matrix.config.msystem }}
update: true update: true
install: >- install: >-
base-devel base-devel
git git
zip zip
unzip
mingw-w64-${{ matrix.config.arch }}-gcc
mingw-w64-${{ matrix.config.arch }}-meson
mingw-w64-${{ matrix.config.arch }}-ninja
mingw-w64-${{ matrix.config.arch }}-ca-certificates
mingw-w64-${{ matrix.config.arch }}-ntldd
- name: Set Environment Variables - name: Set Environment Variables
run: | run: |
echo "$HOME/.local/bin" >> "$GITHUB_PATH" echo "$HOME/.local/bin" >> "$GITHUB_PATH"
echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV" echo "INSTALL_REF=${{ needs.release.outputs.version }}" >> "$GITHUB_ENV"
if [[ "${MSYSTEM}" == "MINGW64" ]]; then if [[ "${MSYSTEM}" == "MINGW64" ]]; then
echo "BUILD_ARCH=x86_64" >> "$GITHUB_ENV"
echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-windows-x86_64" >> "$GITHUB_ENV" echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-windows-x86_64" >> "$GITHUB_ENV"
echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-windows-x86_64" >> "$GITHUB_ENV" echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-windows-x86_64" >> "$GITHUB_ENV"
else else
echo "BUILD_ARCH=i686" >> "$GITHUB_ENV"
echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-windows-i686" >> "$GITHUB_ENV" echo "INSTALL_NAME=lite-xl-${{ needs.release.outputs.version }}-windows-i686" >> "$GITHUB_ENV"
echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-windows-i686" >> "$GITHUB_ENV" echo "INSTALL_NAME_ADDONS=lite-xl-${{ needs.release.outputs.version }}-addons-windows-i686" >> "$GITHUB_ENV"
fi fi
- name: Install Dependencies - name: Install Dependencies
if: false
run: bash scripts/install-dependencies.sh --debug run: bash scripts/install-dependencies.sh --debug
- name: Build - name: Build
run: | run: |
bash --version bash --version
bash scripts/build.sh -U --debug --forcefallback --release bash scripts/build.sh -U --debug --forcefallback --release
- name: Package - name: Package
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary --release run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary --release
- name: Build Installer - name: Build Installer
run: bash scripts/innosetup/innosetup.sh --debug --version ${INSTALL_REF} run: bash scripts/innosetup/innosetup.sh --debug --version ${INSTALL_REF}
- name: Package With Addons - name: Package With Addons
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --addons --binary --release run: bash scripts/package.sh --version ${INSTALL_REF} --debug --addons --binary --release
- name: Build Installer With Addons - name: Build Installer With Addons
run: bash scripts/innosetup/innosetup.sh --debug --version ${INSTALL_REF} --addons run: bash scripts/innosetup/innosetup.sh --debug --version ${INSTALL_REF} --addons
- name: Upload Files
uses: softprops/action-gh-release@v1 - name: Upload Artifacts
uses: actions/upload-artifact@v4
with: with:
tag_name: ${{ needs.release.outputs.version }} name: Windows Builds (${{ matrix.config.msystem }})
draft: true path: |
files: |
${{ env.INSTALL_NAME }}.zip ${{ env.INSTALL_NAME }}.zip
${{ env.INSTALL_NAME_ADDONS }}.zip ${{ env.INSTALL_NAME_ADDONS }}.zip
LiteXL-${{ env.INSTALL_REF }}-${{ env.BUILD_ARCH }}-setup.exe LiteXL-${{ env.INSTALL_REF }}-${{ matrix.config.arch }}-setup.exe
LiteXL-${{ env.INSTALL_REF }}-addons-${{ env.BUILD_ARCH }}-setup.exe LiteXL-${{ env.INSTALL_REF }}-addons-${{ matrix.config.arch }}-setup.exe
upload_artifacts:
name: Upload Release Artifacts
runs-on: ubuntu-latest
needs:
[release, build_linux, build_macos, build_macos_universal, build_windows_msys2]
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Update Release
uses: ncipollo/release-action@v1
with:
tag: ${{ needs.release.outputs.version }}
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitNameDuringUpdate: true
omitPrereleaseDuringUpdate: true
allowUpdates: true
artifacts: "*.exe,*.zip,*.tar.gz,*.dmg,*.AppImage"