[FIX] Fix up actions a bit

This commit is contained in:
lda 2023-11-02 20:10:00 +01:00
parent e75d5b7179
commit dac319ab19
Signed by: lda
GPG key ID: 6898757653ABE3E6
2 changed files with 7 additions and 10 deletions

View file

@ -24,4 +24,4 @@ runs:
shell: bash
run: |
echo We are on "${{runner.os}}", requested "${{inputs.compiler}}" as CC
setup "${{ runner.os }}" "${{inputs.compiler}}" "${{inputs.ssl}}"
${GITHUB_ACTION_PATH}/setup "${{ runner.os }}" "${{inputs.compiler}}" "${{inputs.ssl}}"

15
setup
View file

@ -10,11 +10,10 @@ DISTRO=$(grep -E '^NAME=' /etc/os-release |
# Installs a package using the native OS's package manager.
install_pkg() {
case $DISTRO in
"Ubuntu")
"Debian GNU/Linux" )
"Ubuntu"|"Debian GNU/Linux")
apt install -y $1
;;
"Arch Linux" )
"Arch Linux")
pacman -Syu --noconfirm $1
;;
esac
@ -23,15 +22,14 @@ install_pkg() {
install_compiler() {
echo '::group::Setting up a compiler'
case $DISTRO in
"Ubuntu" )
"Debian GNU/Linux" )
"Ubuntu"|"Debian GNU/Linux")
install_pkg build-essential
[ $COMPILER = 'clang' ] && install_pkg clang
CC=gcc
[ $COMPILER = 'clang' ] && CC=clang
;;
"Arch Linux" )
"Arch Linux")
install_pkg $COMPILER make
CC=gcc
[ $COMPILER = 'clang' ] && CC=clang
@ -41,13 +39,12 @@ install_compiler() {
install_ssl() {
echo '::group::Setting up SSL'
case $DISTRO in
"Ubuntu" )
"Debian GNU/Linux" )
"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" )
"Arch Linux")
install_pkg $SSL
esac
echo '::endgroup::'