Make actions modular.

This commit is contained in:
Alexander Artemenko 2021-02-06 12:55:24 +03:00
parent ed1d6fe328
commit 4afcec2ee8
3 changed files with 10 additions and 68 deletions

View file

@ -7,77 +7,10 @@ inputs:
run-tests: run-tests:
description: A command to run tests description: A command to run tests
required: false required: false
qlfile-template:
description: "Djula template for qlfile. All environment variables are available in it's context"
required: false
runs: runs:
using: composite using: composite
steps: steps:
- name: Current Env
shell: bash
run: |
echo ::group::Environment
echo "Current dir:"
pwd
echo "Environment Variables:"
env | sort -u
echo ::endgroup::
- name: Install Roswell
shell: bash
run: |
echo ::group::Install Roswell
if [[ "$OS" == "ubuntu-latest" ]]; then
sudo apt-get -y install git build-essential automake libcurl4-openssl-dev
fi
if [[ "$OS" == "macos-latest" ]]; then
brew install automake autoconf curl
fi
curl -L https://raw.githubusercontent.com/svetlyak40wt/roswell/patches/scripts/install-for-ci.sh | sh
echo $HOME/.roswell/bin >> $GITHUB_PATH
echo ::endgroup::
- name: Upgrade ASDF to the Latest Version
shell: bash
run: |
echo ::group::Upgrade ASDF
ros install asdf
echo ::endgroup::
- name: Install Qlot
shell: bash
run: |
echo ::group::Install Qlot
ros install qlot
echo .qlot/bin >> $GITHUB_PATH
echo ::endgroup::
- name: Create Qlot Environment
shell: bash
run: |
echo ::group::Create Qlot Environment
if [[ -n "${QLFILE_TEMPLATE}" ]]; then
echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/templater.ros > qlfile
rm -f qlfile.lock
fi
qlot install
echo ::endgroup::
env:
QLFILE_TEMPLATE: ${{ inputs.qlfile-template }}
# This step will install system and
# all possible roswell scripts, if the system
# has them in the roswell/ subdirectory:
- name: Install ASDF System
shell: bash
run: |
echo ::group::Install ASDF System
qlot exec ros install ${{ inputs.asdf-system }}
echo ::endgroup::
- name: Run Tests - name: Run Tests
shell: bash shell: bash
run: | run: |

View file

@ -3,7 +3,7 @@ name: 'Setup Common Lisp'
inputs: inputs:
asdf-system: asdf-system:
description: 'ASDF system to install' description: 'ASDF system to install'
required: true required: false
qlfile-template: qlfile-template:
description: "Djula template for qlfile. All environment variables are available in it's context" description: "Djula template for qlfile. All environment variables are available in it's context"
required: false required: false
@ -74,3 +74,4 @@ runs:
echo ::group::Install ASDF System echo ::group::Install ASDF System
qlot exec ros install ${{ inputs.asdf-system }} qlot exec ros install ${{ inputs.asdf-system }}
echo ::endgroup:: echo ::endgroup::
if: ${{ inputs.asdf-system }}

View file

@ -62,6 +62,13 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: 40ants/cl-info/.github/actions/setup-lisp@custom-action
with:
asdf-system: cl-info
qlfile-template: |
{% ifequal quicklisp_dist "ultralisp" %}
dist ultralisp http://dist.ultralisp.org
{% endifequal %}
- uses: 40ants/cl-info/.github/actions/run-tests@custom-action - uses: 40ants/cl-info/.github/actions/run-tests@custom-action
with: with:
asdf-system: cl-info asdf-system: cl-info
@ -70,6 +77,7 @@ jobs:
dist ultralisp http://dist.ultralisp.org dist ultralisp http://dist.ultralisp.org
{% endifequal %} {% endifequal %}
# This is additional step to check # This is additional step to check
# a command line script # a command line script
- name: Run Command Line Version - name: Run Command Line Version