From 9ad6e9a75d1fffc0c65fa73700ea3f74a49449cb Mon Sep 17 00:00:00 2001 From: Rajkumar Natarajan Date: Sat, 7 Feb 2026 12:22:56 -0800 Subject: [PATCH] Add ci/cd support added pr branch to test github actions added pr branch to test github actions added pr branch to test github actions added ci/cd support --- .github/workflows/ci.yml | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cd472fb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,73 @@ +name: CI + +# Trigger the workflow on push or pull request, but only for the main branch +on: + pull_request: + branches: [ "main" ] + push: + branches: [ "main" ] + +jobs: + ghc: + name: "GHC ${{ matrix.ghc }} on ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + ghc: ['8.10', '9.2', '9.8', '9.10', '9.12'] + exclude: + - os: macos-latest + ghc: '8.10' # ghc-8.10 does not support ARM + fail-fast: false + steps: + - name: Checkout base repo + uses: actions/checkout@v4 + + - name: Set up Haskell + id: setup-haskell + uses: haskell-actions/setup@v2 + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: 'latest' + + - name: Configure + run: cabal new-configure + + - name: Freeze + run: cabal freeze + + - name: Cache + uses: actions/cache@v4 + with: + path: ${{ steps.setup-haskell.outputs.cabal-store }} + key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} + restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- + + - name: Build + run: cabal build + + mhs: + runs-on: ubuntu-latest + steps: + - name: checkout mhs repo + uses: actions/checkout@v4 + with: + repository: augustss/MicroHs + ref: v0.14.15.0 + path: mhs + + - name: make and install mhs + run: | + cd mhs + make minstall + + - name: checkout transformers repo + uses: actions/checkout@v4 + with: + path: transformers + + - name: compile and install transformers package + run: | + PATH="$HOME/.mcabal/bin:$PATH" + cd transformers + mcabal install