-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build and release on tag or mainline
- Loading branch information
Showing
9 changed files
with
384 additions
and
54 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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 | ||
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 |
---|---|---|
@@ -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 | ||
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 |
---|---|---|
@@ -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}/* | ||
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 |
---|---|---|
@@ -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 }} |
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 |
---|---|---|
@@ -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 | ||
|
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
Oops, something went wrong.