setup-cytoplasm-telodendria/action.yml

63 lines
2 KiB
YAML
Raw Normal View History

2023-11-03 11:09:56 +00:00
name: Setup Cytoplasm/Telodendria
description: Setup Cytoplasm or Telodendria out
2023-11-02 19:17:31 +00:00
inputs:
2023-11-03 11:09:56 +00:00
to_install:
description:
required: false
2023-11-02 19:46:15 +00:00
default: Cytoplasm
compiler:
description: Compiler to use as CC
required: false
default: gcc
2023-11-03 11:09:56 +00:00
ssl:
description: SSL library used
required: false
2023-11-03 11:09:56 +00:00
default: openssl
2023-11-02 19:17:31 +00:00
runs:
using: composite
steps:
2023-11-03 11:09:56 +00:00
- name: Downloading Cytoplasm/Telodendria
id: download-cyto-telo
if: "${{inputs.to_install == 'Cytoplasm' }}"
2023-11-02 19:17:31 +00:00
shell: bash
run: |
2023-11-03 11:09:56 +00:00
echo Downloading Cytoplasm...
# Shallow build, since we don't have to deal with that.
git clone --depth=1 https://git.telodendria.io/Telodendria/Cytoplasm Cytoplasm
- name: Downloading Cytoplasm/Telodendria
id: download-cyto-telo
if: "${{inputs.to_install == 'Telodendria' }}"
shell: bash
run: |
# Download the right branch of Telodendria.
echo Downloading Telodendria...
git clone ${{github.repositoryUrl}} Telodendria
cd Telodendria
git checkout ${{github.ref_name}}
2023-11-02 20:03:18 +00:00
- name: Compiling ${{inputs.checkout}}
id: compile
2023-11-02 19:17:31 +00:00
shell: bash
run: |
2023-11-03 11:09:56 +00:00
echo Compiling ${{inputs.to_install}}...
cd ${{inputs.to_install}}
export CC="${{inputs.compiler}}"
2023-11-03 11:09:56 +00:00
# We need to tell the valid SSL library if we're dealing with Cytoplasm.
# TODO: Install Cytoplasm to some temporary directory instead of being
# invasive and putting it in /usr.
[ "${{inputs.to_install}}" = "Cytoplasm" ] && ./configure --prefix=/usr --no-static --with-${{inputs.ssl}}
[ "${{inputs.to_install}}" = "Cytoplasm" ] || ./configure --no-static
if ! make; then
# Fails? Do it again. Hopefully, it should have
# seen all of the schemas by then.
2023-11-03 11:09:56 +00:00
#
# TODO: Fix this in Telodendria!
./configure --prefix=/usr --no-static
make 2>&1
2023-11-02 19:59:24 +00:00
fi
2023-11-02 19:53:27 +00:00
[ "${{inputs.install}}" = "true" ] && make install
2023-11-03 11:09:56 +00:00
echo Done!