-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
41 lines (40 loc) · 1.57 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: install-opendylan
description: Install the Open Dylan compiler and tools
inputs:
tag:
required: false
type: string
default: v2024.1.0
runs:
using: composite
steps:
- name: Install Open Dylan
env:
OD_TAG: ${{ inputs.tag }}
shell: bash
run: |
echo "Installing Open Dylan..."
od_version=$(echo ${{ inputs.tag }} | sed -En 's/v([0-9]+\.[0-9]+)\.[0-9]+/\1/p')
opsys=$(uname -s | tr '[:upper:]' '[:lower:]')
env | sort # debug
url="https://github.com/dylan-lang/opendylan/releases/download/${OD_TAG}/opendylan-${od_version}-x86_64-${opsys}.tar.bz2"
echo "Downloading from ${url}"
# Install outside the workspace directory so Deft doesn't find the Open Dylan LID files.
mkdir ../_od
cd ../_od
curl -L -o opendylan.tar.bz2 ${url}
tar xfj opendylan.tar.bz2
ln -s opendylan-${od_version} opendylan
ln -s opendylan-${od_version}/bin/dylan-compiler
ln -s opendylan-${od_version}/bin/dylan
echo "Compiler: ${PWD}/dylan-compiler"
echo "deft: ${PWD}/dylan"
echo -n "Open Dylan "
./dylan-compiler -version
echo -n "dylan version: "
./dylan version
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path
# Eventually we can add opendylan/bin to the path instead of creating
# links in the current directory, but for now there are too many
# non-Dylan programs in opendylan/bin.
echo "${PWD}" >> ${GITHUB_PATH}