name: MiniJuvix CI on: push: branches: [ main , dev ] pull_request: branches: - main - dev jobs: ormolu: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: mrkkrp/ormolu-action@v5 with: extra-args: >- --ghc-opt -XDerivingStrategies --ghc-opt -XImportQualifiedPost --ghc-opt -XMultiParamTypeClasses --ghc-opt -XStandaloneDeriving --ghc-opt -XTemplateHaskell --ghc-opt -XUnicodeSyntax hlint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: 'Set up HLint' uses: rwe/actions-hlint-setup@v1 with: version: '3.1.6' - name: 'Run HLint' uses: rwe/actions-hlint-run@v2.0.1 with: path: '["src/", "app/", "test/"]' fail-on: warning build: runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-latest , macOS-latest ] ghc: ["9.2.2"] steps: - uses: actions/cache@v3 name: Cache Stack id: cache env: cache-name: cache-env with: path: | ~/.stack main/.stack-work main/.hie key: ${{ runner.os }}-v1-build-${{ matrix.ghc }}-${{ hashFiles('main/src/**/*.hs', 'main/app/**/*.hs', 'main/test/**/*.hs', 'main/package.yaml', 'main/stack.yaml') }} restore-keys: | ${{ runner.os }}-v1-build-${{ matrix.ghc }}- ${{ runner.os }}-v1-build- ${{ runner.os }}-v1- - uses: haskell/actions/setup@v1 name: Setup Haskell with: ghc-version: ${{ matrix.ghc }} enable-stack: true stack-version: 'latest' - name: Checkout our repository uses: actions/checkout@v2 with: path: main - name: Build Haskell Project run: | cd main make ci-build - name: Download MiniJuvix-stdlib run: | cd main make minijuvix-stdlib test: needs: build runs-on: ${{ matrix.os }} strategy: matrix: os: [ macOS-latest , ubuntu-latest ] ghc: ["9.2.2"] steps: - uses: actions/cache@v3 id: cache-build with: path: | ~/.stack main/.stack-work/ main/.hie key: ${{ runner.os }}-v1-build-${{ matrix.ghc }}- - name: Checkout the main repository uses: actions/checkout@v2 with: path: main - name: Cache LLVM and Clang id: cache-llvm uses: actions/cache@v3 with: path: | C:/Program Files/LLVM ./llvm key: ${{ runner.os }}-llvm-13 - name: Install LLVM and Clang uses: KyleMayes/install-llvm-action@v1 with: version: "13.0" cached: ${{ steps.cache-llvm.outputs.cache-hit }} - name: Download and extract wasi-sysroot run: | curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-15/wasi-sysroot-15.0.tar.gz -OL tar xfv wasi-sysroot-15.0.tar.gz - name: Download and extract libclang_rt.builtins-wasm32-wasi run: | curl https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-15/libclang_rt.builtins-wasm32-wasi-15.0.tar.gz -OL tar xfv libclang_rt.builtins-wasm32-wasi-15.0.tar.gz working-directory: ${{ env.LLVM_PATH }} - name: Set WASI_SYSROOT_PATH run: | echo "WASI_SYSROOT_PATH=$GITHUB_WORKSPACE/wasi-sysroot" >> $GITHUB_ENV - name: Setup Wasmer uses: wasmerio/setup-wasmer@v1 - name: Test suite id: test run: | cd main make ci-test