Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: provide prebuilt release binaries and installer #93

Open
wants to merge 69 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
5f7e200
build and release on tag or mainline
airtonix Dec 27, 2022
c3edf79
Provide download tool and updated README
airtonix Dec 27, 2022
e3bc603
remove unused code
airtonix Dec 28, 2022
35cea68
basic documentation
airtonix Dec 28, 2022
50f01dc
Merge pull request #3 from airtonix/feature/69-prebuilt-release-binaries
airtonix Dec 28, 2022
b648cba
highlight the two methods
airtonix Dec 28, 2022
0a64309
PR feedback changes
airtonix Dec 28, 2022
37df86c
fixed incorrect platform detection and added downloader output
airtonix Dec 29, 2022
2671b7d
ubuntu and macos release files have os version in them
airtonix Dec 29, 2022
420529b
bump runner os used in matrix builds
airtonix Feb 16, 2023
b46ef29
use the builtin tools to make the dir
airtonix Feb 16, 2023
2044b6c
bump runner os used in matrix builds
airtonix Feb 16, 2023
e06f047
use the builtin tools to make the dir
airtonix Feb 16, 2023
8d10c1a
fix incorrect os name
airtonix Feb 16, 2023
ebde5c8
Merge branch 'main' into feature/69-prebuilt-release-binaries
airtonix Feb 16, 2023
98db1d6
linting
airtonix Feb 16, 2023
6cb64e6
Merge branch 'main' into feature/69-prebuilt-release-binaries
airtonix Feb 16, 2023
bf46f68
add missing export
airtonix Feb 16, 2023
d905cc9
return to origin state
airtonix Feb 16, 2023
3cc1c49
yet more linting
airtonix Feb 16, 2023
f483919
describe platform separately from build OS
airtonix Feb 16, 2023
10b9dac
linting
airtonix Feb 16, 2023
1348b5b
fix linux platform name
airtonix Feb 16, 2023
486611c
remove invalid key
airtonix Feb 16, 2023
7cc2156
use correct binary name for windows
airtonix Feb 19, 2023
bcaaef0
Merge branch 'main' into feature/69-prebuilt-release-binaries
airtonix Feb 19, 2023
31d6026
prefix job names for easier use in branch protection
airtonix Feb 19, 2023
618b8de
Merge branch 'feature/69-prebuilt-release-binaries' of github.com:air…
airtonix Feb 19, 2023
7085841
remove prefix
airtonix Feb 19, 2023
5920c90
Merge pull request #4 from airtonix/feature/69-prebuilt-release-binaries
airtonix Feb 19, 2023
d013802
Merge branch 'main' of github.com:nvim-telescope/telescope-fzf-native…
airtonix Feb 19, 2023
7fdf272
fix release workflow dependencies
airtonix Feb 19, 2023
7e4cb94
Merge branch 'main' into feature/69-prebuilt-release-binaries
airtonix Feb 19, 2023
6388c4f
always use forward slash for urls
airtonix Feb 19, 2023
4adec98
no longer uses subshell to make directorioes
airtonix Apr 3, 2023
3cc1d5c
refactor actions to support arm64 builds
airtonix Apr 3, 2023
65026e4
no need for arch in the matrix now
airtonix Apr 3, 2023
08274e1
make sure artifacts leave the container
airtonix Apr 3, 2023
9eb5b3b
let the run on arch always setup for artifacts
airtonix Apr 3, 2023
34c1daa
runs-on-arch has different os names to github runson
airtonix Apr 3, 2023
93dd376
aarch64.ubuntu22.04 only exists on v2.5.0
airtonix Apr 3, 2023
b2a0149
add git
airtonix Apr 3, 2023
aee56a7
dont need sudo in the container, already root
airtonix Apr 3, 2023
88da04f
jit.arch gives osx, windows and linux
airtonix Apr 3, 2023
b093f23
ensure platform and arch are lowercase
airtonix Apr 3, 2023
f827263
these dont need to be vars now
airtonix Apr 3, 2023
6e84d86
ci jobs need to point to new action names
airtonix Apr 4, 2023
7157cf0
job name should be consistent with other jobnames
airtonix Apr 4, 2023
6db4fda
same compile action inputs as test action
airtonix Apr 4, 2023
22795a0
action name has x64 not just 64
airtonix Apr 4, 2023
acc7014
handle injected yaml multiline vars
airtonix Apr 4, 2023
40fab2d
ensure arm and x64 linux jobs are identifiable
airtonix Apr 4, 2023
ba9f1e0
linting
airtonix Apr 4, 2023
6e9ad39
cringe: pass inputs directingly into run.
airtonix Apr 4, 2023
62d19fa
need clang tooling
airtonix Apr 4, 2023
a6f6819
we dont install, only build
airtonix Apr 4, 2023
44dfb19
download same release as plugin tag installed.
airtonix Apr 4, 2023
d0ad36e
linting
airtonix Apr 4, 2023
25934dd
set cwd so we get the right repo
airtonix Apr 4, 2023
33f55c6
remove clever stuff.
airtonix Apr 4, 2023
b1f4e81
linting
airtonix Apr 4, 2023
e485866
update README
airtonix Apr 4, 2023
047f5c4
add experimental zig cross compiling
airtonix Apr 4, 2023
e4ab0a4
allow custom command
airtonix Apr 4, 2023
ac5fdc5
make zig available
airtonix Apr 4, 2023
a3f7390
just test out macos for now
airtonix Apr 5, 2023
0573940
correctly name the job
airtonix Apr 5, 2023
caf126a
doesnt work
airtonix Apr 5, 2023
af1d3c6
Merge branch 'main' into feature/69-prebuilt-release-binaries
airtonix Jul 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/actions/compile-unix/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Compile Unix Library

description: |
Prepare and compile unix builds

inputs:
compiler:
required: true
description: Compiler to use

runs:
using: composite
steps:

- name: Prepare
env:
CC: ${{ inputs.compiler }}
shell: bash
run: |
cc --version
git clone https://github.com/Conni2461/examiner
cd examiner
make && sudo make install

- name: Build
env:
CC: ${{ inputs.compiler }}
LD_LIBRARY_PATH: /usr/lib:/usr/local/lib
shell: bash
run: make
22 changes: 22 additions & 0 deletions .github/actions/compile-windows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Compile windows library

description: |
Prepare and compile a windows build

runs:

using: composite

steps:
- uses: lukka/get-cmake@latest

- name: Build
# powershell 7 is part of the 2019 toolset:
# https://github.com/actions/runner-images/blob/win19/20221214.4/images/win/Windows2019-Readme.md
shell: pwsh
run: |
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
cmake --install build --prefix build

51 changes: 51 additions & 0 deletions .github/actions/nvim-unix-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Test Unix Library

description: |
Run some neovim tests

inputs:
os:
required: true
description: OS being tested
url:
required: true
description: OS being tested

runs:
using: composite
steps:

- name: create cache key
shell: bash
run: date +%F > todays-date

- name: Restore cache for today's nightly.
uses: actions/cache@v2
with:
path: _neovim
key: ${{ inputs.os }}-${{ hashFiles('todays-date') }}

- name: Prepare
shell: bash
run: |
test -d _neovim || {
mkdir -p _neovim
curl -sL ${{ inputs.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
}
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start

- name: Build
shell: bash
run: make

- name: Tests
shell: bash
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make ntest

44 changes: 44 additions & 0 deletions .github/actions/prepare-artifacts/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Prepare artifacts

description: |
Downloads all prior artifacts into a directory.

each artifact will be in its own directory named after the
job that uploaded it.

outputs:
staging_area:
description: Area in which artifacts from prior jobs are collated
value: ${{ steps.directories.outputs.staging_area }}

runs:
using: composite
steps:

- name: Prepare Staging Area
shell: bash
id: directories
run: |
echo "staging_area=$(mktemp -d)" >> $GITHUB_OUTPUT
echo "artifacts=$(mktemp -d)" >> $GITHUB_OUTPUT

- name: Download artifact
uses: actions/download-artifact@v2
with:
path: ${{ steps.directories.outputs.artifacts }}

- name: Prepare Release
env:
STAGING: ${{ steps.directories.outputs.staging_area }}
ARTIFACTS: ${{ steps.directories.outputs.artifacts }}
shell: bash
run: |
for file in ${ARTIFACTS}/**/*; do
FILENAME=$(basename $file)
PLATFORM=$(basename $(dirname $file))
cp $file "${STAGING}/${PLATFORM}-${FILENAME}"
done

ls -al ${STAGING}/*

86 changes: 86 additions & 0 deletions .github/actions/release-binaries/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
name: Create binary release

description: |
Takes artifacts in a source directory and creates a release

inputs:

source:
required: true
description: source directory

is_development_release:
description: Is this a dev release?
default: 'true'

is_production_release:
description: Is this a prod release?
default: 'false'

development_title:
description: Title of the release when it is a development release
required: true

development_tag:
description: Name of the tag when it is a development release
required: true

production_title:
description: Title of the release when it is a production release
required: true

production_tag:
description: Name of the tag when it is a production release
required: true

runs:
using: composite

steps:

# Development Release
#
# If workflow runs because commits are pushd to the mainline
# branch, then it's assumed to be a development release.
#
# There's only ever one "development" release, whatever is the latest
# changes to `main`.
#
# For version release, see below "Production Release"
#
- uses: ncipollo/release-action@v1
name: Release Development
if: ${{ inputs.is_development_release == 'true' }}
with:
name: ${{ inputs.development_title }}
tag: ${{ inputs.development_tag }}
omitBody: true
omitBodyDuringUpdate: false
allowUpdates: true
makeLatest: false
prerelease: true
removeArtifacts: true
replacesArtifacts: true
artifacts: ${{ inputs.source }}/*
commit: ${{ github.sha }}


# Production Release
#
# If the workflow runs because a tag was pushed, then this is considered
# a production release.
#
- uses: ncipollo/release-action@v1
name: Release Tag
if: ${{ inputs.is_production_release == 'true' }}
with:
name: ${{ inputs.production_title }}
tag: ${{ inputs.production_tag }}
omitBody: true
allowUpdates: true
makeLatest: true
removeArtifacts: true
replacesArtifacts: true
artifacts: ${{ inputs.source }}/*
commit: ${{ github.sha }}
26 changes: 26 additions & 0 deletions .github/actions/test-unix/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Test unix library

description: |
Compile and test a unix build

inputs:
compiler:
required: true
description: Compiler to use


runs:
using: composite
steps:
- uses: ./.github/actions/compile-unix
with:
compiler: ${{ inputs.compiler }}

- name: Tests
env:
CC: ${{ inputs.compiler }}
LD_LIBRARY_PATH: /usr/lib:/usr/local/lib
shell: bash
run: make test

71 changes: 20 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ name: CI

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
gcc:
name: c build and tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
Expand All @@ -17,42 +21,23 @@ jobs:
compiler: gcc
- os: macos-10.15
compiler: clang

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Prepare
env:
CC: ${{ matrix.compiler }}
run: |
cc --version
git clone https://github.com/Conni2461/examiner
cd examiner
make && sudo make install
- name: Build
env:
CC: ${{ matrix.compiler }}
LD_LIBRARY_PATH: /usr/lib:/usr/local/lib
run: make
- name: Tests
env:
CC: ${{ matrix.compiler }}
LD_LIBRARY_PATH: /usr/lib:/usr/local/lib
run: make test
- uses: actions/checkout@v3
- uses: ./.github/actions/test-unix
with:
compiler: ${{ matrix.compiler }}

windows:
name: windows
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- uses: lukka/get-cmake@latest
- name: Build
run: |
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
cmake --install build --prefix build
- uses: actions/checkout@v3
- uses: ./.github/actions/compile-windows

nvim-tests:
name: nvim-tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15]
Expand All @@ -61,28 +46,12 @@ jobs:
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
- os: macos-10.15
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: date +%F > todays-date
- name: Restore cache for today's nightly.
uses: actions/cache@v2
- uses: actions/checkout@v3
- uses: ./.github/actions/nvim-unix-test
with:
path: _neovim
key: ${{ matrix.os }}-${{ hashFiles('todays-date') }}
- name: Prepare
run: |
test -d _neovim || {
mkdir -p _neovim
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
}
mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim
ln -s $(pwd) ~/.local/share/nvim/site/pack/vendor/start
- name: Build
run: make
- name: Tests
run: |
export PATH="${PWD}/_neovim/bin:${PATH}"
export VIM="${PWD}/_neovim/share/nvim/runtime"
nvim --version
make ntest
os: ${{ matrix.os }}
url: ${{ matrix.url }}

Loading