-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to work with pragtical luajit
- Loading branch information
Showing
6 changed files
with
175 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,100 +1,66 @@ | ||
name: CI | ||
on: { push: { branches: [master] } } | ||
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: | | ||
export VERSION=`git describe --tags --match "v*" | tail -c +2` | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
echo "Building terminal version $VERSION." | ||
if [[ `git tag --points-at HEAD | head -c 1` == "v" ]]; then | ||
gh release delete -y v$VERSION || true; gh release create -t v$VERSION v$VERSION | ||
gh release delete -y latest || true; gh release create -t latest latest | ||
fi | ||
gh release delete -y continuous || true; gh release create -p -t 'Continuous Release' continuous | ||
build_linux: | ||
needs: [version] | ||
build_linux_windows: | ||
permissions: write-all | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
defaults: { run: { shell: bash } } | ||
container: ghcr.io/lite-xl/lite-xl-build-box:latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: { fetch-depth: 0, submodules: true } | ||
with: { fetch-depth: 0 } | ||
- name: Set Environment Variables | ||
run: | | ||
git config --global user.name "Github Actions" && git config --global user.email "[email protected]" | ||
echo VERSION=`git describe --tags --abbrev=0 --match "v*" | tail -c +2` >> $GITHUB_ENV | ||
- name: Clone Submodules | ||
run: git submodule update --init --depth=1 | ||
- name: Build Linux | ||
run: BIN=libterminal.x86_64-linux.so ./build.sh -O3 -DLIBTERMINAL_VERSION='"'${{ needs.version.outputs.version }}-x86_64-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 } | ||
run: | | ||
BIN=libterminal.x86_64-linux.so ./build.sh -O3 -DLIBTERMINAL_VERSION='"'$VERSION-x86_64-linux'"' | ||
- name: Build Windows | ||
run: | | ||
sudo apt-get install mingw-w64 | ||
BIN=libterminal.x86_64-windows.dll CC=x86_64-w64-mingw32-gcc ./build.sh -O3 -DLIBTERMINAL_VERSION='"'$VERSION-x86_64-windows'"' | ||
- name: Create Release(s) | ||
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" } | ||
run: | | ||
if git tag --points-at HEAD | tail -n1 | grep "^v"; then | ||
gh release delete -y v$VERSION || true; | ||
gh release create -t v$VERSION v$VERSION *.so *.dll | ||
gh release delete -y latest || true; | ||
gh release create -t latest latest *.so *.dll | ||
fi | ||
gh release delete -y continuous || true; gh release create -p -t 'Continuous Release' continuous *.so *.dll | ||
build_macos: | ||
needs: [version] | ||
permissions: write-all | ||
needs: build_linux_windows | ||
runs-on: macos-11 | ||
env: | ||
CC: clang | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: { fetch-depth: 0, submodules: true } | ||
with: { fetch-depth: 0 } | ||
- name: Set Environment Variables | ||
run: echo VERSION=`git describe --tags --abbrev=0 --match "v*" | tail -c +2` >> $GITHUB_ENV | ||
- name: Clone Submodules | ||
run: git submodule update --init --depth=1 | ||
- 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 | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v3 | ||
with: { fetch-depth: 0 } | ||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: { path: "." } | ||
- name: Finalize Tags | ||
env: { GITHUB_TOKEN: "${{ github.token }}" } | ||
run: | | ||
if [[ `git tag --points-at HEAD | head -c 1` == "v" ]]; then | ||
gh release upload v${{ 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 | ||
BIN=libterminal.x86_64-darwin.so ./build.sh -O3 -DLIBTERMINAL_VERSION='"'$VERSION-x86_64-darwin'"' | ||
BIN=libterminal.aarch64-darwin.so CC=clang CFLAGS="-arch arm64" ./build.sh -O3 -DLIBTERMINAL_VERSION='"'$VERSION-x86_64-darwin'"' | ||
gh release upload continuous *.so | ||
if git tag --points-at HEAD | tail -n1 | grep "^v"; then | ||
gh release upload v$VERSION *.so | ||
gh release upload latest *.so | ||
git branch -f latest HEAD | ||
git tag -f latest | ||
git push -f origin refs/heads/latest | ||
git push -f origin refs/tags/latest | ||
fi | ||
git tag -f continuous | ||
git push -f origin refs/tags/continuous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,25 @@ | ||
{ | ||
"addons" : [ | ||
{ | ||
"description" : "An integrated terminal for lite-xl.", | ||
"files" : [ | ||
{ | ||
"arch" : "x86_64-linux", | ||
"checksum" : "eafe4ea692d4dc8276e59d1028b94faf1a811298120941ba3dd5ba8b7eabfb68", | ||
"url" : "https://github.com/adamharrison/lite-xl-terminal/releases/download/v1.01/libterminal.x86_64-linux.so" | ||
}, | ||
{ | ||
"arch" : "x86_64-darwin", | ||
"checksum" : "ef07c3c5de7516a20ea1f578f4cf8d52a5c30dd7f65e00ea4515d73ea645fe5e", | ||
"url" : "https://github.com/adamharrison/lite-xl-terminal/releases/download/v1.01/libterminal.x86_64-darwin.so" | ||
}, | ||
{ | ||
"arch" : "aarch64-darwin", | ||
"checksum" : "237aaa401238dd02c9b5a161237934de739018b45effe08c8a040577932d50e3", | ||
"url" : "https://github.com/adamharrison/lite-xl-terminal/releases/download/v1.01/libterminal.aarch64-darwin.so" | ||
}, | ||
{ | ||
"arch" : "x86_64-windows", | ||
"checksum" : "6a4c486e87a0f339ef93d890075b9666f6f61d634e8d7a620bfae8c290e6ae31", | ||
"url" : "https://github.com/adamharrison/lite-xl-terminal/releases/download/v1.01/libterminal.x86_64-windows.dll" | ||
} | ||
], | ||
"id" : "terminal", | ||
"path" : "plugins/terminal", | ||
"version" : "1.01" | ||
} | ||
] | ||
"addons": [{ | ||
"id": "terminal", | ||
"description": "An integrated terminal for pragtical.", | ||
"version": "1.01", | ||
"path": "plugins/terminal", | ||
"files": [{ | ||
"url": "https://github.com/pragtical/terminal/releases/download/latest/libterminal.x86_64-linux.so", | ||
"arch": "x86_64-linux", | ||
"checksum": "SKIP" | ||
}, { | ||
"url": "https://github.com/pragtical/terminal/releases/download/latest/libterminal.x86_64-darwin.so", | ||
"arch": "x86_64-darwin", | ||
"checksum": "SKIP" | ||
}, { | ||
"url": "https://github.com/pragtical/terminal/releases/download/latest/libterminal.aarch64-darwin.so", | ||
"arch": "aarch64-darwin", | ||
"checksum": "SKIP" | ||
}, { | ||
"url": "https://github.com/pragtical/terminal/releases/download/latest/libterminal.x86_64-windows.dll", | ||
"arch": "x86_64-windows", | ||
"checksum": "SKIP" | ||
}] | ||
}] | ||
} |
Oops, something went wrong.