Format all code with Fourmolu #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Haskell Stack CI | |
on: [push] | |
jobs: | |
macos: | |
strategy: | |
matrix: | |
os: | |
- macos-12 | |
- macos-13 | |
- macos-14 | |
- macos-15 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Stack | |
uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
stack-no-global: true | |
- name: Install Platypus | |
run: brew install --cask platypus | |
- name: Print Platypus' version | |
run: platypus --version | |
- name: Install ImageMagick | |
run: brew install imagemagick | |
- name: Inject license keys | |
run: | |
sed -i '' | |
's/licenses = \[\]/licenses = \[${{ secrets.LICENSE_KEYS }}\]/' | |
source/Lib.hs | |
- name: Build Perspec App | |
run: make Perspec.app | |
- name: Move App to Artifact Directory | |
run: mkdir artifact && mv Perspec.app artifact | |
- name: Upload MacOS Release | |
uses: actions/upload-artifact@v4 | |
with: | |
path: artifact | |
name: perspec-app_${{ matrix.os }}_x86_64 | |
linux: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Stack | |
uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
stack-no-global: true | |
- name: Add apt repository for libfuse2 | |
run: | |
sudo add-apt-repository universe | |
- name: Install dependencies | |
run: | |
sudo apt-get install | |
freeglut3-dev | |
imagemagick | |
libfuse2 | |
libgl1-mesa-dev | |
libglfw3 | |
libglu1-mesa-dev | |
libxcursor-dev | |
libxi-dev | |
libxinerama-dev | |
libxrandr-dev | |
libxxf86vm-dev | |
- name: Download bundable ImageMagick AppImage | |
run: | |
curl -L -O | |
https://download.imagemagick.org/ImageMagick/download/binaries/magick && | |
chmod +x ./magick | |
- name: Build Perspec CLI tool | |
run: make perspec | |
- name: Install AppImage | |
run: | |
curl -L -O | |
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && | |
chmod +x linuxdeploy-x86_64.AppImage | |
- name: Build AppImage | |
run: | |
./linuxdeploy-x86_64.AppImage | |
--executable $(which perspec) | |
--library /usr/lib/x86_64-linux-gnu/libglut.so.3 | |
--library /usr/lib/x86_64-linux-gnu/libglfw.so.3 | |
--appdir ./AppDir | |
--output appimage | |
--desktop-file ./.desktop | |
--icon-file $(pwd)/images/icon_padded_white_512.png && | |
mv Perspec-*-x86_64.AppImage Perspec_x86_64.AppImage | |
- name: Upload Linux Release | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./Perspec_x86_64.AppImage | |
name: Perspec_x86_64.AppImage |