forked from Telodendria/Telodendria
[MOD] Use local repository
All checks were successful
Testing pushed commits / compile-all (push) Successful in 18s
All checks were successful
Testing pushed commits / compile-all (push) Successful in 18s
This commit is contained in:
parent
6907169d5f
commit
09eee69525
3 changed files with 3 additions and 84 deletions
|
@ -1,22 +0,0 @@
|
|||
name: Setup a basic build environment
|
||||
description: Setup a basic build environment with a proper SSL library
|
||||
|
||||
inputs:
|
||||
compiler:
|
||||
description: Compiler used for setting up everything
|
||||
required: false
|
||||
default: gcc
|
||||
ssl:
|
||||
description: SSL library used for Cytoplasm later on
|
||||
required: false
|
||||
default: openssl
|
||||
|
||||
outputs:
|
||||
compiler:
|
||||
description: Compiler binary
|
||||
value: '${{ steps.install.outputs.compiler }}'
|
||||
|
||||
runs:
|
||||
- run: 'echo We are on "${{runner.os}}", requested "${{inputs.compiler}}" as CC'
|
||||
- run: 'echo hi && setup "${{ runner.os }}" "${{inputs.compiler}}" "${{inputs.ssl}}"'
|
||||
shell: bash
|
|
@ -1,60 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
COMPILER=$2
|
||||
SSL=$3
|
||||
|
||||
DISTRO=$(grep -E '^NAME=' /etc/os-release |
|
||||
cut -d'=' -f2 |
|
||||
tr -d '"')
|
||||
|
||||
# Installs a package using the native OS's package manager.
|
||||
install_pkg() {
|
||||
case $DISTRO in
|
||||
"Ubuntu")
|
||||
"Debian GNU/Linux" )
|
||||
apt install -y $1
|
||||
;;
|
||||
"Arch Linux" )
|
||||
pacman -Syu --noconfirm $1
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
install_compiler() {
|
||||
echo '::group::Setting up a compiler'
|
||||
case $DISTRO in
|
||||
"Ubuntu" )
|
||||
"Debian GNU/Linux" )
|
||||
install_pkg build-essential
|
||||
[ $COMPILER = 'clang' ] && install_pkg clang
|
||||
|
||||
CC=gcc
|
||||
[ $COMPILER = 'clang' ] && CC=clang
|
||||
;;
|
||||
"Arch Linux" )
|
||||
install_pkg $COMPILER make
|
||||
CC=gcc
|
||||
[ $COMPILER = 'clang' ] && CC=clang
|
||||
esac
|
||||
echo '::endgroup::'
|
||||
}
|
||||
install_ssl() {
|
||||
echo '::group::Setting up SSL'
|
||||
case $DISTRO in
|
||||
"Ubuntu" )
|
||||
"Debian GNU/Linux" )
|
||||
# Doesn't seem like Debian got LibreSSL
|
||||
[ $SSL = 'libressl' ] && echo "::error ::LibreSSL is not on Debian"
|
||||
install_pkg openssl
|
||||
;;
|
||||
"Arch Linux" )
|
||||
install_pkg $SSL
|
||||
esac
|
||||
echo '::endgroup::'
|
||||
}
|
||||
|
||||
# Install the compiler and SSL
|
||||
install_compiler
|
||||
install_ssl
|
||||
|
||||
echo "compiler=$CC" >> "$GITHUB_OUTPUT"
|
|
@ -4,15 +4,16 @@ on: [push]
|
|||
|
||||
jobs:
|
||||
# Compiles out everything.
|
||||
setup-repo:
|
||||
compile-all:
|
||||
# TODO: More architectures
|
||||
runs-on: debian
|
||||
steps:
|
||||
# Checks out Telodendria, and setups a basic build environment.
|
||||
- name: Checking out Telodendria
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup build environment
|
||||
uses: https://git.freetards.xyz/lda/ci-setup-cc-ssl@master
|
||||
uses: https://git.telodendria.io/lda/setup-buildenv@master
|
||||
with:
|
||||
compiler: gcc
|
||||
ssl: openssl
|
||||
|
|
Loading…
Reference in a new issue