From f480219e430c8467e07636e3b98fc7aa285eb491 Mon Sep 17 00:00:00 2001 From: Load Accumulator Date: Fri, 3 Nov 2023 12:09:56 +0100 Subject: [PATCH] [MOD] No longer use upstream --- action.yml | 51 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/action.yml b/action.yml index 51a8a71..84f3e12 100644 --- a/action.yml +++ b/action.yml @@ -1,43 +1,62 @@ -name: Setups Cytoplasm -description: Setup Cytoplasm out +name: Setup Cytoplasm/Telodendria +description: Setup Cytoplasm or Telodendria out inputs: - checkout: - description: Link to checkout from + to_install: + description: required: false default: Cytoplasm compiler: description: Compiler to use as CC required: false default: gcc - install: - description: Whenever to make install or not.(true/false) + ssl: + description: SSL library used required: false - default: true + default: openssl runs: using: composite steps: - - name: Downloading Cytoplasm - id: download-cyto + - name: Downloading Cytoplasm/Telodendria + id: download-cyto-telo + if: "${{inputs.to_install == 'Cytoplasm' }}" shell: bash run: | - echo Downloading from "${{inputs.checkout}}".. - echo We are on "${{runner.os}}", requested as CC - git clone https://git.telodendria.io/Telodendria/${{inputs.checkout}} + 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}} + - name: Compiling ${{inputs.checkout}} id: compile shell: bash run: | - echo Compiling ${{inputs.checkout}}... - cd ${{inputs.checkout}} + echo Compiling ${{inputs.to_install}}... + cd ${{inputs.to_install}} export CC="${{inputs.compiler}}" - ./configure --prefix=/usr --no-static + + # 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. + # + # TODO: Fix this in Telodendria! ./configure --prefix=/usr --no-static make 2>&1 fi [ "${{inputs.install}}" = "true" ] && make install - exit 0 # Oops! + echo Done!