setup-lisp/action.yml
2021-09-19 15:18:58 +03:00

103 lines
3 KiB
YAML

name: 'Setup Common Lisp'
inputs:
asdf-system:
description: 'ASDF system to install'
required: false
asdf-version:
description: 'ASDF version to install. If not specified, then latest version will be used'
required: false
qlfile-template:
description: "Djula template for qlfile. All environment variables are available in it's context"
required: false
runs:
using: composite
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 [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update
sudo apt-get -y install git build-essential automake libcurl4-openssl-dev
fi
if [[ "$RUNNER_OS" == "macOS" ]]; 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: |
if [[ -n "${{ inputs.asdf-version }}" ]]; then
echo ::group::Installing ASDF ${{ inputs.asdf-version }}
ros install asdf/${{ inputs.asdf-version }}
else
echo ::group::Installing latest ASDF
ros install asdf
fi
echo ::endgroup::
- name: Install Qlot
shell: bash
# Version 0.11.1 is fixed while issue
# https://github.com/fukamachi/qlot/issues/118
# will not be resolved.
run: |
echo ::group::Install Qlot
ros install fukamachi/qlot/0.11.5
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
if [[ -e qlfile ]]; then
echo 'Here is content of qlfile:'
echo '==============='
cat qlfile
echo '==============='
echo ''
else
echo 'There is no qlfile. Creating an empty one.'
touch qlfile
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
if [[ -n "${{ inputs.asdf-system }}" ]]; then
qlot exec ros install ${{ inputs.asdf-system }}
else
echo "ASDF system wasn't provided."
fi
echo ::endgroup::