Skip to content

tactus tweaks, add s_taperBy #776

tactus tweaks, add s_taperBy

tactus tweaks, add s_taperBy #776

name: build-listener-windows
on:
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
ghc: ['9.0.1']
cabal: ['3.4.0.0']
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Haskell
uses: haskell/actions/setup@v2
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Freeze
run: |
cabal freeze
- name: Cache ~/.cabal/packages, ~/.cabal/store and dist-newstyle
uses: actions/cache@v2
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('tidal-listener/src') }}
- name: cabal build
run: |
cabal update
cabal build --enable-tests tidal-listener
cabal build
- name: remove unneccessary libs
run: |
Remove-Item 'C:\tools\ghc-${{ matrix.ghc }}\lib\ghc-${{ matrix.ghc }}' -Recurse -ErrorAction Ignore
Remove-Item 'C:\tools\ghc-${{ matrix.ghc }}\lib\Cabal-*' -Recurse -ErrorAction Ignore
Remove-Item 'C:\tools\ghc-${{ matrix.ghc }}\lib\rts' -Recurse -ErrorAction Ignore
- name: move GHC libs and configs
run: |
Copy-Item -Path 'C:\tools\ghc-${{ matrix.ghc }}\lib\' -Recurse -Destination 'tidal-listener\binary\haskell-libs\ghc-packages'
Move-Item -Path 'tidal-listener\binary\haskell-libs\ghc-packages\settings' -Destination 'tidal-listener\binary\haskell-libs\settings'
Move-Item -Path 'tidal-listener\binary\haskell-libs\ghc-packages\llvm-passes' -Destination 'tidal-listener\binary\haskell-libs\llvm-passes'
Move-Item -Path 'tidal-listener\binary\haskell-libs\ghc-packages\llvm-targets' -Destination 'tidal-listener\binary\haskell-libs\llvm-targets'
Move-Item -Path 'tidal-listener\binary\haskell-libs\ghc-packages\platformConstants' -Destination 'tidal-listener\binary\haskell-libs\platformConstants'
- name: move mingw
run: Copy-Item -Path 'C:\tools\ghc-${{ matrix.ghc }}\mingw\' -Recurse -Destination 'tidal-listener\binary\mingw'
- name: move installed packages
run: Copy-Item -Path 'C:\sr\ghc-${{ matrix.ghc }}\' -Recurse -Destination 'tidal-listener\binary\haskell-libs\packages'
- name: change paths in config files (packages)
run: |
Move-Item -Path 'tidal-listener\binary\haskell-libs\packages\package.db\' -Destination 'tidal-listener\binary\haskell-libs\package.db\'
$configs = Get-ChildItem 'tidal-listener\binary\haskell-libs\package.db\' -Recurse
$configs | %{ (gc $_) -replace "C:\\sr\\ghc-${{ matrix.ghc }}", '$topdir\packages' | Set-Content $_.fullname}
- name: move ghc package config
run: |
Move-Item -Path 'tidal-listener\binary\haskell-libs\ghc-packages\package.conf.d\' -Destination 'tidal-listener\binary\haskell-libs\package.conf.d\'
$configs = Get-ChildItem 'tidal-listener\binary\haskell-libs\package.conf.d\' -Recurse
$configs | %{ (gc $_) -replace 'topdir', 'topdir\ghc-packages' | Set-Content $_.fullname}
- name: ghc-pkg recache
run: |
$ENV:GHC_PACKAGE_PATH="tidal-listener\binary\haskell-libs\package.conf.d;tidal-listener\binary\haskell-libs\package.db"
ghc-pkg -v2 recache --package-db="tidal-listener\binary\haskell-libs\package.conf.d"
ghc-pkg -v2 recache --package-db="tidal-listener\binary\haskell-libs\package.db"
- name: move executables
run: |
Copy-Item -Path 'dist-newstyle\build\x86_64-windows\ghc-${{ matrix.ghc }}\tidal-listener-0.1.0.0\x\tidal-listener\build\tidal-listener\tidal-listener.exe' -Recurse -Destination 'tidal-listener\binary\tidal-listener.exe'
# Copy-Item -Path 'dist-newstyle\build\x86_64-windows\ghc-${{ matrix.ghc }}\tidal-*\x\tidal\build\tidal\tidal.exe' -Recurse -Destination 'tidal-listener\binary\tidal.exe'
- name: zip files
run: Compress-Archive -LiteralPath 'tidal-listener\binary\' -DestinationPath 'tidal-listener\windows.zip'
- uses: actions/upload-artifact@v2
with:
path: tidal-listener\windows.zip
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v2
- run: ls */*
- uses: softprops/action-gh-release@v1
with:
files: artifact/windows.zip