2021-03-26 14:55:53 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
2021-06-23 16:43:58 +02:00
|
|
|
push:
|
|
|
|
branches:
|
2022-09-25 22:59:01 +02:00
|
|
|
- '*'
|
|
|
|
|
2021-06-23 16:43:58 +02:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-09-25 22:59:01 +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:
|
|
|
|
- { 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 }}
|
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"
|
2023-04-07 19:24:27 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Python Setup
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/setup-python@v4
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
- name: Update Packages
|
|
|
|
run: sudo apt-get update
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: bash scripts/install-dependencies.sh --debug
|
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bash --version
|
|
|
|
bash scripts/build.sh --debug --forcefallback --portable
|
|
|
|
- name: Package
|
|
|
|
if: ${{ matrix.config.cc == 'gcc' }}
|
|
|
|
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary
|
|
|
|
- name: Upload Artifacts
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-09-25 22:59:01 +02:00
|
|
|
if: ${{ matrix.config.cc == 'gcc' }}
|
|
|
|
with:
|
|
|
|
name: Linux Artifacts
|
|
|
|
path: ${{ env.INSTALL_NAME }}.tar.gz
|
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
|
2022-09-25 22:59:01 +02:00
|
|
|
runs-on: macos-11
|
2021-08-09 12:39:03 +02:00
|
|
|
env:
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
2023-04-11 17:33:34 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: ['x86_64', 'arm64']
|
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
|
|
|
|
- name: Set Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
2023-04-11 17:33:34 +02:00
|
|
|
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
|
2023-04-07 19:24:27 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Python Setup
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/setup-python@v4
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
- name: Install Dependencies
|
2023-04-11 17:33:34 +02:00
|
|
|
# --lhelper will eliminate a warning with arm64 and libusb
|
|
|
|
run: bash scripts/install-dependencies.sh --debug --lhelper
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bash --version
|
2023-04-11 17:33:34 +02:00
|
|
|
bash scripts/build.sh --bundle --debug --forcefallback $ARCH
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Create DMG Image
|
2023-04-11 17:33:34 +02:00
|
|
|
run: bash scripts/package.sh --version ${INSTALL_REF} $ARCH --debug --dmg
|
2022-09-25 22:59:01 +02:00
|
|
|
- name: Upload DMG Image
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-09-25 22:59:01 +02:00
|
|
|
with:
|
2023-04-11 17:33:34 +02:00
|
|
|
name: macOS DMG Images
|
|
|
|
path: ${{ env.INSTALL_NAME }}.dmg
|
|
|
|
|
|
|
|
build_macos_universal:
|
|
|
|
name: macOS (Universal)
|
|
|
|
runs-on: macos-11
|
|
|
|
needs: build_macos
|
|
|
|
steps:
|
|
|
|
- name: System Information
|
|
|
|
run: |
|
|
|
|
system_profiler SPSoftwareDataType
|
|
|
|
bash --version
|
|
|
|
gcc -v
|
|
|
|
xcodebuild -version
|
|
|
|
- name: Set Environment Variables
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_NAME=lite-xl-${GITHUB_REF##*/}-macos-universal" >> "$GITHUB_ENV"
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Download artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
id: download
|
|
|
|
with:
|
|
|
|
name: macOS DMG Images
|
|
|
|
path: dmgs-original
|
|
|
|
- name: Install appdmg
|
|
|
|
run: cd ~; npm i appdmg; cd -
|
|
|
|
- name: Make universal bundles
|
|
|
|
run: |
|
|
|
|
bash --version
|
|
|
|
bash scripts/make-universal-binaries.sh ${{ steps.download.outputs.download-path }} "${INSTALL_NAME}"
|
|
|
|
- name: Upload DMG Image
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: macOS Universal DMG Images
|
2022-09-25 22:59:01 +02:00
|
|
|
path: ${{ env.INSTALL_NAME }}.dmg
|
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:
|
|
|
|
- {msystem: MINGW32, arch: i686}
|
|
|
|
- {msystem: MINGW64, arch: x86_64}
|
2021-08-09 12:39:03 +02:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
steps:
|
2023-04-07 19:24:27 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-08-09 12:39:03 +02:00
|
|
|
- uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
2023-04-07 19:25:31 +02:00
|
|
|
msystem: ${{ matrix.config.msystem }}
|
2021-08-09 12:39:03 +02:00
|
|
|
install: >-
|
|
|
|
base-devel
|
|
|
|
git
|
|
|
|
zip
|
2023-04-07 19:25:31 +02:00
|
|
|
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
|
2021-08-09 12:39:03 +02:00
|
|
|
- name: Set Environment Variables
|
2021-08-29 10:15:55 +02:00
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
|
|
echo "INSTALL_REF=${GITHUB_REF##*/}" >> "$GITHUB_ENV"
|
2022-09-25 22:59:01 +02:00
|
|
|
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
|
2021-08-09 12:39:03 +02:00
|
|
|
- name: Install Dependencies
|
2023-04-07 19:25:31 +02:00
|
|
|
if: false
|
2021-08-29 10:15:55 +02:00
|
|
|
run: bash scripts/install-dependencies.sh --debug
|
2021-08-09 12:39:03 +02:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bash --version
|
2022-09-25 22:59:01 +02:00
|
|
|
bash scripts/build.sh -U --debug --forcefallback
|
2021-08-09 12:39:03 +02:00
|
|
|
- name: Package
|
2022-09-25 22:59:01 +02:00
|
|
|
run: bash scripts/package.sh --version ${INSTALL_REF} --debug --binary
|
2021-08-09 12:39:03 +02:00
|
|
|
- name: Upload Artifacts
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-08-09 12:39:03 +02:00
|
|
|
with:
|
|
|
|
name: Windows Artifacts
|
2022-09-25 22:59:01 +02:00
|
|
|
path: ${{ env.INSTALL_NAME }}.zip
|
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 }
|
2022-11-16 04:23:45 +01:00
|
|
|
steps:
|
2023-04-07 19:24:27 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-11-16 04:23:45 +01:00
|
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
with:
|
2023-04-07 19:24:27 +02:00
|
|
|
arch: ${{ matrix.arch.target }}
|
|
|
|
- uses: actions/setup-python@v2
|
2022-11-16 04:23:45 +01:00
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
- name: Install meson and ninja
|
|
|
|
run: pip install meson ninja
|
|
|
|
- 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
|
|
|
|
"LUA_SUBPROJECT_PATH=subprojects/lua-5.4.4" >> $env:GITHUB_ENV
|
|
|
|
- name: Configure
|
|
|
|
run: |
|
2023-04-07 19:25:31 +02:00
|
|
|
# Download the subprojects first so we can patch it before configuring.
|
|
|
|
# This avoids reconfiguring the subprojects when compiling.
|
|
|
|
meson subprojects download
|
2022-11-16 04:23:45 +01:00
|
|
|
Get-Content -Path resources/windows/001-lua-unicode.diff -Raw | patch -d $env:LUA_SUBPROJECT_PATH -p1 --forward
|
2023-04-07 19:25:31 +02:00
|
|
|
meson setup --wrap-mode=forcefallback build
|
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"
|
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"
|
|
|
|
- name: Upload Artifacts
|
2023-04-07 19:24:27 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-11-16 04:23:45 +01:00
|
|
|
with:
|
|
|
|
name: Windows Artifacts (MSVC)
|
|
|
|
path: ${{ env.INSTALL_NAME }}.zip
|