Skip to content

Changes to work with pragtical luajit #36

Changes to work with pragtical luajit

Changes to work with pragtical luajit #36

Workflow file for this run

name: CI
on: { push: { branches: [master] } }
env:
PPM_PLUGINS: https://raw.githubusercontent.com/adamharrison/lite-xl-maintenance/latest/lpm-plugins/gh.lua
permissions: write-all
jobs:
version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.setup_release.outputs.version }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
with: { fetch-depth: 0 }
- name: Setup Release
id: setup_release
env: { GITHUB_TOKEN: "${{ github.token }}" }
run: |
wget https://github.com/pragtical/plugin-manager/releases/download/latest/ppm.x86_64-linux -O ppm-latest && chmod +x ppm-latest
echo "version=`./ppm-latest gh version`" >> $GITHUB_OUTPUT
build_linux:
needs: [version]
permissions: write-all
runs-on: ubuntu-20.04
defaults: { run: { shell: bash } }
steps:
- name: Checkout Code
uses: actions/checkout@v3
with: { fetch-depth: 0, submodules: true }
- name: Install Cross Compiler
run: |
sudo apt-get install -y gcc-aarch64-linux-gnu
- name: Build Linux
run: |
BIN=libterminal.x86_64-linux.so ./build.sh -O3 -DLIBTERMINAL_VERSION='"'${{ needs.version.outputs.version }}-x86_64-linux'"'
BIN=libterminal.aarch64-linux.so CC=aarch64-linux-gnu-gcc ./build.sh -O3 -DLIBTERMINAL_VERSION='"'${{ needs.version.outputs.version }}-aarch64-linux'"'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with: { name: "Linux", path: "*.so" }
build_windows:
needs: [version]
permissions: write-all
runs-on: ubuntu-latest
defaults: { run: { shell: bash } }
steps:
- name: Checkout Code
uses: actions/checkout@v3
with: { fetch-depth: 0, submodules: true }
- name: Build Windows
env: { GITHUB_TOKEN: "${{ github.token }}" }
run: sudo apt-get install mingw-w64 && BIN=libterminal.x86_64-windows.dll CC=x86_64-w64-mingw32-gcc ./build.sh -O3 -DLIBTERMINAL_VERSION='"'${{ needs.version.outputs.version }}-x86_64-windows'"'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with: { name: "Windows", path: "*.dll" }
build_macos:
needs: [version]
runs-on: macos-11
env:
CC: clang
steps:
- name: Checkout Code
uses: actions/checkout@v3
with: { fetch-depth: 0, submodules: true }
- name: Build MacOS
env: { GITHUB_TOKEN: "${{ github.token }}" }
run: |
./build.sh clean
BIN=libterminal.x86_64-darwin.so ./build.sh -O3 -DLIBTERMINAL_VERSION='"'${{ needs.version.outputs.version }}-x86_64-darwin'"'
BIN=libterminal.aarch64-darwin.so CC=clang CFLAGS="-arch arm64" ./build.sh -O3 -DLIBTERMINAL_VERSION='"'${{ needs.version.outputs.version }}-x86_64-darwin'"'
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with: { name: "MacOS", path: "*.so" }
finalize:
needs: [version, build_macos, build_linux, build_windows]
runs-on: ubuntu-latest
environment: Release
steps:
- name: Checkout Code
uses: actions/checkout@v3
with: { fetch-depth: 0 }
- name: Download Artifacts
uses: actions/download-artifact@v3
with: { path: "." }
- name: Perform Release
env:
GITHUB_TOKEN: "${{ github.token }}"
run: |
if [[ `git tag --points-at HEAD | head -c 1` == "v" ]]; then
gh release upload ${{ needs.version.outputs.version }} Linux/*.so MacOS/*.so Windows/*.dll
gh release upload latest Linux/*.so MacOS/*.so Windows/*.dll
git branch -f latest HEAD
git tag -f latest
git push -f origin refs/heads/latest
git push -f origin refs/tags/latest
fi
gh release upload continuous Linux/*.so MacOS/*.so Windows/*.dll
git tag -f continuous
git push -f origin refs/tags/continuous