setup-lisp/action.yml

108 lines
3.2 KiB
YAML
Raw Normal View History

2021-02-06 09:41:50 +00:00
name: 'Setup Common Lisp'
inputs:
roswell-version:
description: 'Roswell version to install. If not specified, then latest version will be used'
required: false
default: 'master'
2021-02-06 09:41:50 +00:00
asdf-system:
description: 'ASDF system to install'
2021-02-06 09:55:24 +00:00
required: false
asdf-version:
description: 'ASDF version to install. If not specified, then latest version will be used'
required: false
2021-02-06 09:41:50 +00:00
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
2021-02-06 10:57:19 +00:00
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update
2021-02-06 09:41:50 +00:00
sudo apt-get -y install git build-essential automake libcurl4-openssl-dev
fi
2021-02-06 10:59:58 +00:00
if [[ "$RUNNER_OS" == "macOS" ]]; then
2021-02-06 09:41:50 +00:00
brew install automake autoconf curl
fi
curl -L https://raw.githubusercontent.com/roswell/roswell/${{ inputs.roswell-version }}/scripts/install-for-ci.sh | sh
2021-02-06 09:41:50 +00:00
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
2021-02-06 09:41:50 +00:00
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.
2021-02-06 09:41:50 +00:00
run: |
echo ::group::Install Qlot
2021-09-19 12:18:58 +00:00
ros install fukamachi/qlot/0.11.5
2021-02-06 09:41:50 +00:00
echo .qlot/bin >> $GITHUB_PATH
echo ::endgroup::
- name: Create Qlot Environment
shell: bash
run: |
echo ::group::Create Qlot Environment
2021-02-06 12:32:32 +00:00
if [[ -n "${QLFILE_TEMPLATE}" ]]; then
2021-02-07 13:48:22 +00:00
echo "${QLFILE_TEMPLATE}" | ${{ github.action_path }}/templater.ros > qlfile
2021-02-06 12:32:32 +00:00
rm -f qlfile.lock
fi
2021-02-06 12:09:39 +00:00
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
2021-02-06 11:51:43 +00:00
2021-02-06 09:41:50 +00:00
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
2021-02-06 10:01:30 +00:00
if [[ -n "${{ inputs.asdf-system }}" ]]; then
qlot exec ros install ${{ inputs.asdf-system }}
else
echo "ASDF system wasn't provided."
fi
2021-02-06 09:41:50 +00:00
echo ::endgroup::