# windows CI tests # basic hledger/hledger-web build testing, and binary building, run nightly name: windows CI on: schedule: - cron: "0 23 * * *" # uncomment when testing CI: push: branches: [ master ] paths: - 'stack*' - 'hledger-lib' - 'hledger' - 'hledger-ui' - 'hledger-web' - '.github/workflows/*' - '!**.md' - '!**.1' - '!**.5' - '!**.info' - '!**.txt' # pull_request: # branches: [ master ] # paths: # - 'stack*' # - 'hledger-lib' # - 'hledger' # - 'hledger-ui' # - 'hledger-web' # - '.github/workflows/*' # - '!**.md' # - '!**.1' # - '!**.5' # - '!**.info' # - '!**.txt' jobs: build: runs-on: windows-latest steps: # cached things - name: Cache ~/.stack uses: actions/cache@v1 with: path: ~/.stack key: ${{ runner.os }}-stack - name: Cache %APPDATA%/.stack uses: actions/cache@v1 with: path: %APPDATA%/.stack key: ${{ runner.os }}-stack - name: Cache $APPDATA/.stack uses: actions/cache@v1 with: path: $APPDATA/.stack key: ${{ runner.os }}-stack - name: Cache %APPDATA%/local/bin uses: actions/cache@v1 with: path: %APPDATA%/local/bin key: ${{ runner.os }}-local-bin - name: Cache $APPDATA/local/bin uses: actions/cache@v1 with: path: $APPDATA/local/bin key: ${{ runner.os }}-local-bin - name: Cache .stack-work uses: actions/cache@v1 with: path: .stack-work key: ${{ runner.os }}-stack-work - name: Cache hledger-lib/.stack-work uses: actions/cache@v1 with: path: hledger-lib/.stack-work key: ${{ runner.os }}-hledger-lib-stack-work - name: Cache hledger/.stack-work uses: actions/cache@v1 with: path: hledger/.stack-work key: ${{ runner.os }}-hledger-stack-work - name: Cache hledger-ui/.stack-work uses: actions/cache@v1 with: path: hledger-ui/.stack-work key: ${{ runner.os }}-hledger-ui-stack-work - name: Cache hledger-web/.stack-work uses: actions/cache@v1 with: path: hledger-web/.stack-work key: ${{ runner.os }}-hledger-web-stack-work # actions - name: Check out uses: actions/checkout@v2 - name: Install stack run: | curl -skL -o stack.zip http://www.stackage.org/stack/windows-x86_64 7z x stack.zip -oC:\Windows stack.exe stack --version - name: Install GHC run: | stack --resolver=lts setup # - name: Install shelltestrunner # - if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.9; fi # - shelltest --version - name: Install haskell deps run: | stack --resolver=lts test --only-dependencies # --no-terminal --bench --install-ghc - name: Build hledger run: | stack --resolver=lts install --ghc-options=-Werror --test # --no-terminal --bench --no-run-benchmarks --haddock --no-haddock-deps # run hledger-lib/hledger functional tests, skipping the ones for addons #- COLUMNS=80 stack exec -- shelltest --execdir -j16 tests -x /bin -x /addons # - name: Zip exes # run: | # #cd `stack path --local-bin` # 7z a hledger.zip %HOME%/.local/bin/hledger %HOME%/.local/bin/hledger-web # - name: Upload zip file # uses: actions/upload-artifact@v1 # with: # name: hledger.zip # path: hledger.zip