Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
polymorphicengine committed Feb 14, 2025
1 parent 40e1e3f commit 8c2ffc2
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 5 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/pack-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Linux CI

on:
push:
tags:
- "v*.*.*"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["9.8.2"]
cabal: ["3.10.3.0"]

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Setup Haskell
uses: haskell/actions/setup@v1
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Freeze
run: |
cabal freeze
- name: Cache cabal
uses: actions/cache@v2
id: cache-cabal
with:
path: "~/.cabal"
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('/home/runner/work/zwirnzi/zwirnzi/app') }}-1

- name: Cache dist
uses: actions/cache@v2
id: cache-bin
with:
path: "/dist-newstyle/"
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('/home/runner/work/zwirnzi/zwirnzi/app') }}-2

- name: cabal update and build
run: |
cabal update
cabal v2-build --enable-executable-stripping
- name: make directory
run: mkdir build

- name: move executable
run: mv dist-newstyle/build/x86_64-linux/ghc-${{ matrix.ghc }}/zwirnzi-0.1.0.0/x/zwirnzi/build/zwirnzi/zwirnzi build/zwirnzi


- name: Release
uses: softprops/action-gh-release@v1
with:
files: build/zwirnzi
58 changes: 58 additions & 0 deletions .github/workflows/pack-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Mac-CI

on:
push:
tags:
- "v*.*.*"

jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
ghc: ["9.8.2"]
cabal: ["3.10.3.0"]

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Setup Haskell
uses: haskell/actions/setup@v1
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}

- name: Freeze
run: |
cabal freeze
- name: Cache cabal
uses: actions/cache@v2
id: cache-cabal
with:
path: "~/.cabal"
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('/Users/runner/work/zwirnzi/zwirnzi/app') }}-a

- name: Cache dist
uses: actions/cache@v2
id: cache-bin
with:
path: "/dist-newstyle/"
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('/Users/runner/work/zwirnzi/zwirnzi/app') }}-b

- name: cabal update and build
run: |
cabal update
cabal v2-build --enable-executable-stripping
- name: make directory
run: mkdir build

- name: move executable
run: mv dist-newstyle/build/x86_64-osx/ghc-${{ matrix.ghc }}/zwirnzi-0.1.0.0/x/zwirnzi/build/zwirnzi/zwirnzi build/zwirnzi

- name: Release
uses: softprops/action-gh-release@v1
with:
files: build/zwirnzi
57 changes: 57 additions & 0 deletions .github/workflows/pack-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Windows CI

on:
push:
tags:
- "v*.*.*"

jobs:
build:
runs-on: windows-latest
strategy:
matrix:
ghc: ["9.8.2"]
cabal: ["3.10.3.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
uses: actions/cache@v2
id: cache-cabal
with:
path: 'C:\sr'
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('D:\a\zwirnzi\zwirnzi\app\') }}-a

- name: Cache dist
uses: actions/cache@v2
id: cache-bin
with:
path: 'D:\a\tidal-gui\tidal-gui\dist-newstyle\'
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('D:\a\zwirnzi\zwirnzi\app\') }}-b

- name: cabal build
run: cabal v2-build --enable-executable-stripping

- name: create dir
run: New-Item -Path 'D:\a\zwirnzi\zwirnzi\build' -type directory

- name: move executable
run: Move-Item -Path 'D:\a\zwirnzi\zwirnzi\dist-newstyle\build\x86_64-windows\ghc-${{ matrix.ghc }}\zwirnzi-0.1.0.0\x\zwirnzi\build\zwirnzi\zwirnzi.exe' -Destination 'D:\a\zwirnzi\zwirnzi\build\zwirnzi.exe'


- name: Release
uses: softprops/action-gh-release@v2
with:
files: build/zwirnzi.exe
4 changes: 0 additions & 4 deletions cabal.project.local

This file was deleted.

2 changes: 1 addition & 1 deletion zwirnzi.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build-type: Simple
extra-doc-files: README.md


executable zwirn-ci
executable zwirnzi
main-is: Main.hs
other-modules: CI.Backend
CI.Setup
Expand Down

0 comments on commit 8c2ffc2

Please sign in to comment.