mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-23 19:21:53 +03:00
[wip] Add script for nightly build
This commit is contained in:
parent
61dafd4026
commit
e50ae17e6c
36
.github/workflows/build_nightly-on-tag.yml
vendored
Normal file
36
.github/workflows/build_nightly-on-tag.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: "Build VimR nightly on tag"
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'nightly'
|
||||
|
||||
jobs:
|
||||
Build-universal:
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
- name: Install brew packages
|
||||
run: |
|
||||
brew update >/dev/null
|
||||
brew upgrade
|
||||
brew install automake ninja coreutils
|
||||
- name: Build VimR
|
||||
run: |
|
||||
code_sign=false clean=true use_carthage_cache=false ./bin/build_nightly.sh
|
||||
#- name: Create release and upload artifact
|
||||
# env:
|
||||
# GH_REPO: ${{ github.repository }}
|
||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# run: |
|
||||
# gh release create ${{ github.ref_name }}
|
||||
# gh release upload ${{ github.ref_name }} .build/x86_64-apple-macosx/release/NvimServer-x86_64.tar.bz2
|
||||
#- uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: NvimServer-x86_64
|
||||
# path: .build/x86_64-apple-macosx/release/NvimServer-x86_64.tar.bz2
|
||||
# if-no-files-found: error
|
||||
# retention-days: 7
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit d64b13a8dc42b9d770b578e885769c3572a6552a
|
||||
Subproject commit 16444d8623adba9ea90842928e66f9193668e0af
|
61
bin/build_nightly.sh
Executable file
61
bin/build_nightly.sh
Executable file
@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
readonly code_sign=${code_sign:?"true or false"}
|
||||
readonly use_carthage_cache=${use_carthage_cache:?"true or false"}
|
||||
readonly clean=${clean:?"true or false"}
|
||||
|
||||
prepare_nvimserver() {
|
||||
resources_folder="./NvimView/Sources/NvimView/Resources"
|
||||
rm -rf "${resources_folder}/NvimServer"
|
||||
rm -rf "${resources_folder}/runtime"
|
||||
|
||||
# Create and copy runtime folder
|
||||
install_path="$(/usr/bin/mktemp -d -t 'nvim-runtime')"
|
||||
nvim_install_path="${install_path}" ./NvimServer/NvimServer/bin/build_runtime.sh
|
||||
cp -r "${install_path}/share/nvim/runtime" "${resources_folder}"
|
||||
|
||||
# Copy VimR specific vim file to runtime/plugin folder
|
||||
cp "${resources_folder}/com.qvacua.NvimView.vim" "${resources_folder}/runtime/plugin"
|
||||
|
||||
# Build NvimServer and copy
|
||||
build_libnvim=true ./NvimServer/NvimServer/bin/build_nvimserver.sh
|
||||
cp ./NvimServer/.build/apple/Products/Release/NvimServer "${resources_folder}"
|
||||
}
|
||||
|
||||
main () {
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
|
||||
echo "### Building VimR nightly"
|
||||
|
||||
local -r build_path="./build"
|
||||
|
||||
# Carthage often crashes => do it at the beginning.
|
||||
echo "### Updating carthage"
|
||||
if [[ "${use_carthage_cache}" == true ]]; then
|
||||
carthage update --cache-builds --platform macos
|
||||
else
|
||||
carthage update --platform macos
|
||||
fi
|
||||
|
||||
prepare_nvimserver
|
||||
|
||||
echo "### Xcodebuilding"
|
||||
rm -rf ${build_path}
|
||||
|
||||
deployment_target="$(jq -r .deploymentTargets.nightly ./resources/buildInfo.json)"
|
||||
xcodebuild \
|
||||
MACOSX_DEPLOYMENT_TARGET="${deployment_target}" \
|
||||
-configuration Release -derivedDataPath ${build_path} \
|
||||
-workspace VimR.xcworkspace -scheme VimR \
|
||||
clean build
|
||||
|
||||
if [[ "${code_sign}" == true ]]; then
|
||||
local -r -x vimr_app_path="${build_path}/Build/Products/Release/VimR.app"
|
||||
./bin/sign_vimr.sh
|
||||
fi
|
||||
|
||||
echo "### Built VimR target"
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
main
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"deploymentTargets": {
|
||||
"x86_64": "10.13",
|
||||
"arm64": "11.00"
|
||||
"arm64": "11.00",
|
||||
"nightly": "11.00"
|
||||
},
|
||||
"dependencies": {
|
||||
"vimrDeps": "vimr-deps-2021-12-12",
|
||||
|
Loading…
Reference in New Issue
Block a user