2021-03-26 14:55:53 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
2021-06-23 16:43:58 +02:00
|
|
|
push:
|
|
|
|
branches:
|
2024-06-07 04:08:12 +02:00
|
|
|
- "*"
|
2022-09-25 22:59:01 +02:00
|
|
|
|
2021-06-23 16:43:58 +02:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2024-06-07 04:08:12 +02:00
|
|
|
- "*"
|
2021-03-26 14:55:53 +01:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
workflow_dispatch:
|
2021-08-09 12:39:03 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
jobs:
|
2021-08-09 12:39:03 +02:00
|
|
|
build_linux:
|
|
|
|
name: Linux
|
2022-09-25 22:59:01 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2021-03-26 14:55:53 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-04-13 23:06:07 +02:00
|
|
|
config:
|
2024-06-07 04:08:12 +02:00
|
|
|
- { name: "GCC", cc: gcc, cxx: g++ }
|
|
|
|
- { name: "clang", cc: clang, cxx: clang++ }
|
2021-03-26 14:55:53 +01:00
|
|
|
env:
|
2021-04-13 23:06:07 +02:00
|
|
|
CC: ${{ matrix.config.cc }}
|
|
|
|
CXX: ${{ matrix.config.cxx }}
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2021-03-26 14:55:53 +01:00
|
|
|
steps:
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Set Environment Variables
|
|
|
|
if: ${{ matrix.config.cc == 'gcc' }}
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
|
|
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-linux-$(uname -m)-portable" >> "$GITHUB_ENV"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Python Setup
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/setup-python@v5
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
2024-06-07 04:08:12 +02:00
|
|
|
python-version: "3.11"
|
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Update Packages
|
|
|
|
run: sudo apt-get update
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: bash scripts/install-dependencies.sh --debug
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bash --version
|
|
|
|
bash scripts/build.sh --debug --forcefallback --portable
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Package
|
|
|
|
if: ${{ matrix.config.cc == 'gcc' }}
|
|
|
|
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Upload Artifacts
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-09-25 22:59:01 +02:00
|
|
|
if: ${{ matrix.config.cc == 'gcc' }}
|
|
|
|
with:
|
|
|
|
name: Linux Artifacts
|
|
|
|
path: ${{ env.INSTALL_NAME }}.tar.gz
|
2024-06-07 04:08:12 +02:00
|
|
|
compression-level: 0
|
2021-03-26 14:55:53 +01:00
|
|
|
|
2021-08-09 12:39:03 +02:00
|
|
|
build_macos:
|
2023-04-11 17:33:34 +02:00
|
|
|
name: macOS
|
2024-06-18 05:38:41 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- { arch: x86_64, runner: macos-13 } # macos-13 uses x86_64
|
|
|
|
- { arch: arm64, runner: macos-14 } # macos-14 / latest uses M1
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.config.runner }}
|
2021-08-09 12:39:03 +02:00
|
|
|
env:
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2021-08-09 12:39:03 +02:00
|
|
|
steps:
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: System Information
|
|
|
|
run: |
|
|
|
|
system_profiler SPSoftwareDataType
|
|
|
|
bash --version
|
|
|
|
gcc -v
|
|
|
|
xcodebuild -version
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Set Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
2024-06-18 05:38:41 +02:00
|
|
|
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-macos-${{ matrix.config.arch }}" >> "$GITHUB_ENV"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Python Setup
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/setup-python@v5
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
2024-06-07 04:08:12 +02:00
|
|
|
python-version: "3.11"
|
|
|
|
|
2024-06-18 05:38:41 +02:00
|
|
|
# installing md5sha1sum will eliminate a warning with arm64 and libusb
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Install Dependencies
|
2024-06-18 05:38:41 +02:00
|
|
|
run: |
|
|
|
|
brew install bash md5sha1sum
|
|
|
|
pip install meson ninja dmgbuild
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bash --version
|
2024-06-18 05:38:41 +02:00
|
|
|
bash scripts/build.sh --bundle --debug --forcefallback
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Create DMG Image
|
2024-06-18 05:38:41 +02:00
|
|
|
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --dmg
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Upload DMG Image
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
2024-06-18 05:38:41 +02:00
|
|
|
name: macOS DMG Images (${{ matrix.config.arch }})
|
2023-04-11 17:33:34 +02:00
|
|
|
path: ${{ env.INSTALL_NAME }}.dmg
|
2024-06-07 04:08:12 +02:00
|
|
|
compression-level: 0
|
2023-04-11 17:33:34 +02:00
|
|
|
|
|
|
|
build_macos_universal:
|
|
|
|
name: macOS (Universal)
|
2024-06-18 05:38:41 +02:00
|
|
|
runs-on: macos-14
|
2023-04-11 17:33:34 +02:00
|
|
|
needs: build_macos
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2023-04-11 17:33:34 +02:00
|
|
|
steps:
|
|
|
|
- name: System Information
|
|
|
|
run: |
|
|
|
|
system_profiler SPSoftwareDataType
|
|
|
|
bash --version
|
|
|
|
gcc -v
|
|
|
|
xcodebuild -version
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2023-04-11 17:33:34 +02:00
|
|
|
- name: Set Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-macos-universal" >> "$GITHUB_ENV"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2023-11-10 02:44:58 +01:00
|
|
|
- name: Setup Python
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/setup-python@v5
|
2023-11-10 02:44:58 +01:00
|
|
|
with:
|
2024-06-07 04:08:12 +02:00
|
|
|
python-version: "3.11"
|
|
|
|
|
2023-11-10 02:44:58 +01:00
|
|
|
- name: Install dmgbuild
|
|
|
|
run: pip install dmgbuild
|
2024-06-07 04:08:12 +02:00
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2023-04-11 17:33:34 +02:00
|
|
|
- name: Download artifacts
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/download-artifact@v4
|
2023-04-11 17:33:34 +02:00
|
|
|
id: download
|
|
|
|
with:
|
2024-06-07 04:08:12 +02:00
|
|
|
pattern: macOS DMG Images *
|
|
|
|
merge-multiple: true
|
2023-04-11 17:33:34 +02:00
|
|
|
path: dmgs-original
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2023-04-11 17:33:34 +02:00
|
|
|
- name: Make universal bundles
|
|
|
|
run: |
|
|
|
|
bash --version
|
|
|
|
bash scripts/make-universal-binaries.sh ${{ steps.download.outputs.download-path }} "${INSTALL_NAME}"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2023-04-11 17:33:34 +02:00
|
|
|
- name: Upload DMG Image
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-04-11 17:33:34 +02:00
|
|
|
with:
|
2024-06-07 04:08:12 +02:00
|
|
|
name: macOS DMG Images (Universal)
|
2022-09-25 22:59:01 +02:00
|
|
|
path: ${{ env.INSTALL_NAME }}.dmg
|
2024-06-07 04:08:12 +02:00
|
|
|
compression-level: 0
|
2021-08-09 12:39:03 +02:00
|
|
|
|
|
|
|
build_windows_msys2:
|
|
|
|
name: Windows
|
|
|
|
runs-on: windows-2019
|
2021-04-13 23:06:07 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-07 19:25:31 +02:00
|
|
|
config:
|
2024-06-07 04:08:12 +02:00
|
|
|
- { msystem: MINGW32, arch: i686 }
|
|
|
|
- { msystem: MINGW64, arch: x86_64 }
|
2021-08-09 12:39:03 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2021-08-09 12:39:03 +02:00
|
|
|
steps:
|
2024-06-07 04:08:12 +02:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup MSYS2
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.config.msystem }}
|
|
|
|
install: >-
|
|
|
|
base-devel
|
|
|
|
git
|
|
|
|
zip
|
|
|
|
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
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
|
|
|
if [[ "${MSYSTEM}" == "MINGW64" ]]; then
|
|
|
|
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-windows-x86_64" >> "$GITHUB_ENV"
|
|
|
|
else
|
|
|
|
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-windows-i686" >> "$GITHUB_ENV"
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
if: false
|
|
|
|
run: bash scripts/install-dependencies.sh --debug
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bash --version
|
|
|
|
bash scripts/build.sh -U --debug --forcefallback
|
|
|
|
|
|
|
|
- name: Package
|
|
|
|
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary
|
|
|
|
|
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: Windows Artifacts (${{ matrix.config.msystem }})
|
|
|
|
path: ${{ env.INSTALL_NAME }}.zip
|
|
|
|
compression-level: 0
|
2022-11-16 04:23:45 +01:00
|
|
|
|
|
|
|
build_windows_msvc:
|
|
|
|
name: Windows (MSVC)
|
|
|
|
runs-on: windows-2019
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2023-04-07 19:24:27 +02:00
|
|
|
arch:
|
|
|
|
- { target: x86, name: i686 }
|
|
|
|
- { target: x64, name: x86_64 }
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
steps:
|
2024-06-07 04:08:12 +02:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup MSVC
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
2022-11-16 04:23:45 +01:00
|
|
|
with:
|
2023-04-07 19:24:27 +02:00
|
|
|
arch: ${{ matrix.arch.target }}
|
2024-06-07 04:08:12 +02:00
|
|
|
|
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v5
|
2022-11-16 04:23:45 +01:00
|
|
|
with:
|
2024-06-07 04:08:12 +02:00
|
|
|
python-version: "3.11"
|
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
- name: Install meson and ninja
|
|
|
|
run: pip install meson ninja
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
- name: Set up environment variables
|
|
|
|
run: |
|
2023-04-07 19:24:27 +02:00
|
|
|
"INSTALL_NAME=lite-xl-$($env:GITHUB_REF -replace ".*/")-windows-msvc-${{ matrix.arch.name }}" >> $env:GITHUB_ENV
|
2022-11-16 04:23:45 +01:00
|
|
|
"INSTALL_REF=$($env:GITHUB_REF -replace ".*/")" >> $env:GITHUB_ENV
|
2023-11-30 02:46:56 +01:00
|
|
|
"LUA_SUBPROJECT_PATH=subprojects/$(awk -F ' *= *' '/directory/ { printf $2 }' subprojects/lua.wrap)" >> $env:GITHUB_ENV
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2023-10-20 03:09:51 +02:00
|
|
|
- name: Download and patch subprojects
|
|
|
|
shell: bash
|
2022-11-16 04:23:45 +01:00
|
|
|
run: |
|
2023-04-07 19:25:31 +02:00
|
|
|
meson subprojects download
|
2023-10-20 03:09:51 +02:00
|
|
|
cat resources/windows/001-lua-unicode.diff | patch -Np1 -d "$LUA_SUBPROJECT_PATH"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2023-10-20 03:09:51 +02:00
|
|
|
- name: Configure
|
|
|
|
run: |
|
2023-04-07 19:25:31 +02:00
|
|
|
meson setup --wrap-mode=forcefallback build
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
- name: Build
|
2023-04-07 19:24:27 +02:00
|
|
|
run: |
|
|
|
|
meson install -C build --destdir="../lite-xl"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
- name: Package
|
|
|
|
run: |
|
|
|
|
Remove-Item -Recurse -Force -Path "lite-xl/lib","lite-xl/include"
|
|
|
|
Compress-Archive -Path lite-xl -DestinationPath "$env:INSTALL_NAME.zip"
|
2024-06-07 04:08:12 +02:00
|
|
|
|
2022-11-16 04:23:45 +01:00
|
|
|
- name: Upload Artifacts
|
2024-06-07 04:08:12 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
2022-11-16 04:23:45 +01:00
|
|
|
with:
|
2024-06-07 04:08:12 +02:00
|
|
|
name: Windows Artifacts (MSVC ${{ matrix.arch.target }})
|
2022-11-16 04:23:45 +01:00
|
|
|
path: ${{ env.INSTALL_NAME }}.zip
|
2024-06-07 04:08:12 +02:00
|
|
|
compression-level: 0
|