Skip to content

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Apr 29, 2024
1 parent 7016005 commit 2535f0c
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
12 changes: 9 additions & 3 deletions base/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:
if: runner.os == 'macOS'
shell: bash
run: |
brew install pkg-config
brew install pkg-config openssl@3.0
mkdir __prep__
pushd __prep__
Expand All @@ -35,7 +35,7 @@ runs:
shell: bash
run: |
echo "LD_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=/usr/local/opt/cardano/lib/pkgconfig:/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH" \
echo "PKG_CONFIG_PATH=/opt/homebrew/opt/openssl@3.0/lib/pkgconfig:/usr/local/opt/cardano/lib/pkgconfig:/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/icu4c/lib/pkgconfig:$PKG_CONFIG_PATH" \
>> $GITHUB_ENV
# There are three pkg-config packages available for mingw, and each one has their problems:
Expand All @@ -60,7 +60,13 @@ runs:
mv /c/Strawberry/perl/bin/pkg-config /c/Strawberry/perl/bin/perl-pkg-config
mv /c/Strawberry/perl/bin/pkg-config.bat /c/Strawberry/perl/bin/perl-pkg-config.bat
/usr/bin/pacman --noconfirm -S mingw-w64-x86_64-pkg-config mingw-w64-x86_64-openssl
/usr/bin/pacman --noconfirm -S mingw-w64-x86_64-pkg-config wget
# OpenSSL .pc files are wrong in openssl-3.3.0 https://github.com/msys2/MINGW-packages/issues/20763
wget https://repo.msys2.org/mingw/mingw64/mingw-w64-x86_64-openssl-3.2.1-1-any.tar.zst
/usr/bin/pacman --noconfirm -U mingw-w64-x86_64-openssl-3.2.1-1-any.tar.zst
rm mingw-w64-x86_64-openssl-3.2.1-1-any.tar.zst
echo "PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1" >> $GITHUB_ENV
echo "PKG_CONFIG_ALLOW_SYSTEM_LIBS=1" >> $GITHUB_ENV
Expand Down
50 changes: 50 additions & 0 deletions haskell/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,56 @@ outputs:
runs:
using: "composite"
steps:
- name: Install GHCup (Linux & MacOS)
if: runner.os != 'Windows'
shell: bash
run: |
if ! type ghcup &>/dev/null; then
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
export BOOTSTRAP_HASKELL_MINIMAL=1
export GHCUP_INSTALL_BASE_PREFIX=$HOME
ghcup_bin=$GHCUP_INSTALL_BASE_PREFIX/.ghcup/bin
# Install GHCup
curl --proto '=https' --tlsv1.2 -fsSL https://get-ghcup.haskell.org | sh > /dev/null 2>&1
echo "PATH=$ghcup_bin:$PATH" >> $GITHUB_ENV
else
ghcup nuke
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
export BOOTSTRAP_HASKELL_MINIMAL=1
export GHCUP_INSTALL_BASE_PREFIX=$HOME
ghcup_bin=$GHCUP_INSTALL_BASE_PREFIX/.ghcup/bin
# Install GHCup
curl --proto '=https' --tlsv1.2 -fsSL https://get-ghcup.haskell.org | sh > /dev/null 2>&1
echo "PATH=$ghcup_bin:$PATH" >> $GITHUB_ENV
fi
- name: Install GHCup (Windows)
if: runner.os == 'Windows'
shell: 'C:/msys64/usr/bin/bash.exe -e {0}'
run: |
if ! type ghcup &>/dev/null; then
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
export BOOTSTRAP_HASKELL_MINIMAL=1
export GHCUP_INSTALL_BASE_PREFIX="/c/"
ghcup_bin=$GHCUP_INSTALL_BASE_PREFIX/ghcup/bin
# Install GHCup
curl --proto '=https' --tlsv1.2 -fsSL https://get-ghcup.haskell.org | sh > /dev/null 2>&1
echo "PATH=$ghcup_bin:$PATH" >> $GITHUB_ENV
else
ghcup nuke
export BOOTSTRAP_HASKELL_NONINTERACTIVE=1
export BOOTSTRAP_HASKELL_MINIMAL=1
export GHCUP_INSTALL_BASE_PREFIX="/c/"
ghcup_bin=$GHCUP_INSTALL_BASE_PREFIX/ghcup/bin
# Install GHCup
curl --proto '=https' --tlsv1.2 -fsSL https://get-ghcup.haskell.org | sh > /dev/null 2>&1
echo "PATH=$ghcup_bin:$PATH" >> $GITHUB_ENV
fi
- name: Setup GHC
if: inputs.ghc-version != ''
shell: bash
Expand Down

0 comments on commit 2535f0c

Please sign in to comment.