2020-03-07 00:54:32 +03:00
|
|
|
# basic hledger/hledger-web build testing, and binary building,
|
|
|
|
# on windows, run nightly
|
2020-03-06 21:54:00 +03:00
|
|
|
|
2020-03-07 00:54:32 +03:00
|
|
|
name: windows nightly CI
|
2020-03-06 21:54:00 +03:00
|
|
|
|
|
|
|
on:
|
2020-03-07 06:00:10 +03:00
|
|
|
# XXX not supported yet; build on noteworthy push to "ci" instead
|
2020-03-07 05:31:18 +03:00
|
|
|
# schedule:
|
|
|
|
# - cron: "0 23 * * *"
|
2020-03-06 21:54:00 +03:00
|
|
|
# uncomment when testing CI:
|
|
|
|
push:
|
2020-03-07 05:31:18 +03:00
|
|
|
branches: [ ci, master ] # master too for testing
|
2020-03-06 21:54:00 +03:00
|
|
|
paths:
|
2020-03-07 06:37:35 +03:00
|
|
|
- '.github/workflows/windows-nightly.yml'
|
2020-03-06 21:54:00 +03:00
|
|
|
- 'stack*'
|
|
|
|
- 'hledger-lib'
|
|
|
|
- 'hledger'
|
|
|
|
- 'hledger-ui'
|
|
|
|
- 'hledger-web'
|
|
|
|
- '!**.md'
|
|
|
|
- '!**.1'
|
|
|
|
- '!**.5'
|
|
|
|
- '!**.info'
|
|
|
|
- '!**.txt'
|
|
|
|
# pull_request:
|
|
|
|
# branches: [ master ]
|
|
|
|
# paths:
|
|
|
|
# - 'stack*'
|
|
|
|
# - 'hledger-lib'
|
|
|
|
# - 'hledger'
|
|
|
|
# - 'hledger-ui'
|
|
|
|
# - 'hledger-web'
|
2020-03-06 22:06:15 +03:00
|
|
|
# - '.github/workflows/windows*'
|
2020-03-06 21:54:00 +03:00
|
|
|
# - '!**.md'
|
|
|
|
# - '!**.1'
|
|
|
|
# - '!**.5'
|
|
|
|
# - '!**.info'
|
|
|
|
# - '!**.txt'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
|
2020-03-07 12:38:10 +03:00
|
|
|
- name: Check out
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-03-07 13:05:27 +03:00
|
|
|
- name: Show stuff
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
ls -lRF /C/Users/runneradmin/AppData/Local
|
|
|
|
# # ls C:\Users\runneradmin\
|
|
|
|
# # ls C:\Users\runneradmin\AppData\
|
|
|
|
# # ls C:\Users\runneradmin\AppData\Local\
|
|
|
|
# # ls C:\Users\runneradmin\AppData\Local\Programs\
|
|
|
|
# # ls C:\Users\runneradmin\AppData\Local\Programs\stack
|
|
|
|
# # ls C:\Users\runneradmin\AppData\Local\Programs\stack\x86_64-windows
|
|
|
|
# # ls C:\Users\runneradmin\AppData\LocalLow\
|
|
|
|
# # ls C:\Users\runneradmin\AppData\Roaming\
|
|
|
|
# # ls C:\Users\runneradmin\AppData\Roaming\stack\
|
|
|
|
# run: |
|
|
|
|
# ls C:\Users\runneradmin\AppData\Roaming\local\bin\
|
|
|
|
# ls C:\Users\runneradmin\AppData\Roaming\local\
|
|
|
|
# ls D:\a\hledger
|
|
|
|
# ls D:\a
|
|
|
|
# ls D:\
|
|
|
|
|
2020-03-07 12:38:10 +03:00
|
|
|
# declare/restore cached things
|
2020-03-06 21:54:00 +03:00
|
|
|
|
2020-03-07 12:51:53 +03:00
|
|
|
# stack's global package db, holding package indexes, our haskell deps, downloaded ghc
|
2020-03-06 22:16:13 +03:00
|
|
|
- name: Cache C:\Users\runneradmin\AppData\Local\Programs\stack\
|
2020-03-06 21:54:00 +03:00
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
2020-03-06 22:16:13 +03:00
|
|
|
path: C:\Users\runneradmin\AppData\Local\Programs\stack\
|
2020-03-07 12:35:07 +03:00
|
|
|
# which files signal a change in the global stack dir ?
|
2020-03-07 12:51:53 +03:00
|
|
|
# **.yaml includes stack.yaml and */package.yaml, and hopefully no other changing yamls
|
|
|
|
# stack.lock should be included too, but how..
|
|
|
|
key: ${{ runner.os }}-appdata-local-programs-stack-${{ hashFiles('**.yaml') }}
|
2020-03-07 13:05:27 +03:00
|
|
|
restore-keys: ${{ runner.os }}-appdata-local-programs-stack
|
2020-03-06 22:41:27 +03:00
|
|
|
|
2020-03-07 12:51:53 +03:00
|
|
|
# stack's local bin dir (like ~/.local/bin)
|
2020-03-06 22:41:27 +03:00
|
|
|
- name: Cache C:\Users\runneradmin\AppData\Roaming\stack\
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: C:\Users\runneradmin\AppData\Roaming\stack\
|
2020-03-07 12:51:53 +03:00
|
|
|
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }}
|
2020-03-07 13:05:27 +03:00
|
|
|
restore-keys: ${{ runner.os }}-appdata-roaming-stack
|
2020-03-06 22:41:27 +03:00
|
|
|
|
2020-03-07 12:51:53 +03:00
|
|
|
# stack's local package dbs, for the project and each package
|
2020-03-06 21:54:00 +03:00
|
|
|
- name: Cache .stack-work
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: .stack-work
|
2020-03-07 12:51:53 +03:00
|
|
|
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
|
2020-03-07 13:05:27 +03:00
|
|
|
restore-key: ${{ runner.os }}-stack-work
|
2020-03-06 21:54:00 +03:00
|
|
|
|
|
|
|
- name: Cache hledger-lib/.stack-work
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: hledger-lib/.stack-work
|
2020-03-07 12:51:53 +03:00
|
|
|
key: ${{ runner.os }}-hledger-lib-stack-work-${{ hashFiles('hledger-lib/package.yaml') }}
|
2020-03-07 13:05:27 +03:00
|
|
|
restore-key: ${{ runner.os }}-hledger-lib-stack-work
|
2020-03-06 21:54:00 +03:00
|
|
|
|
|
|
|
- name: Cache hledger/.stack-work
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: hledger/.stack-work
|
2020-03-07 12:51:53 +03:00
|
|
|
key: ${{ runner.os }}-hledger-stack-work-${{ hashFiles('hledger/package.yaml') }}
|
2020-03-07 13:05:27 +03:00
|
|
|
restore-key: ${{ runner.os }}-hledger-stack-work
|
2020-03-06 21:54:00 +03:00
|
|
|
|
|
|
|
- name: Cache hledger-ui/.stack-work
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: hledger-ui/.stack-work
|
2020-03-07 12:51:53 +03:00
|
|
|
key: ${{ runner.os }}-hledger-ui-stack-work-${{ hashFiles('hledger-ui/package.yaml') }}
|
2020-03-07 13:05:27 +03:00
|
|
|
restore-key: ${{ runner.os }}-hledger-ui-stack-work
|
2020-03-06 21:54:00 +03:00
|
|
|
|
|
|
|
- name: Cache hledger-web/.stack-work
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: hledger-web/.stack-work
|
2020-03-07 12:51:53 +03:00
|
|
|
key: ${{ runner.os }}-hledger-web-stack-work-${{ hashFiles('hledger-web/package.yaml') }}
|
2020-03-07 13:05:27 +03:00
|
|
|
restore-key: ${{ runner.os }}-hledger-web-stack-work
|
2020-03-06 21:54:00 +03:00
|
|
|
|
|
|
|
# actions
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
2020-03-06 22:24:26 +03:00
|
|
|
- name: Install GHC
|
|
|
|
run: |
|
2020-03-07 13:05:27 +03:00
|
|
|
stack --resolver=lts --no-terminal setup --install-ghc
|
2020-03-06 22:24:26 +03:00
|
|
|
|
2020-03-06 21:54:00 +03:00
|
|
|
# - name: Install shelltestrunner
|
|
|
|
# - if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.9; fi
|
|
|
|
# - shelltest --version
|
|
|
|
|
|
|
|
- name: Install haskell deps
|
|
|
|
run: |
|
2020-03-07 05:31:18 +03:00
|
|
|
stack --resolver=lts --no-terminal build --test --only-dependencies
|
2020-03-06 22:16:13 +03:00
|
|
|
# --bench --install-ghc
|
2020-03-06 21:54:00 +03:00
|
|
|
|
|
|
|
- name: Build hledger
|
|
|
|
run: |
|
2020-03-06 22:16:13 +03:00
|
|
|
stack --resolver=lts --no-terminal install --ghc-options=-Werror --test
|
|
|
|
# --bench --no-run-benchmarks --haddock --no-haddock-deps
|
2020-03-06 21:54:00 +03:00
|
|
|
|
|
|
|
# run hledger-lib/hledger functional tests, skipping the ones for addons
|
|
|
|
#- COLUMNS=80 stack exec -- shelltest --execdir -j16 tests -x /bin -x /addons
|
|
|
|
|
2020-03-07 07:06:20 +03:00
|
|
|
- name: Zip exes
|
2020-03-07 07:24:59 +03:00
|
|
|
#cd `stack path --local-bin`
|
2020-03-07 07:06:20 +03:00
|
|
|
run: |
|
|
|
|
cd C:\Users\runneradmin\AppData\Roaming\local\bin\
|
2020-03-07 07:24:59 +03:00
|
|
|
7z a D:\a\hledger\hledger\hledger.zip hledger.exe hledger-web.exe
|
|
|
|
|
2020-03-07 07:06:20 +03:00
|
|
|
- name: Upload zip file
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: hledger.zip
|
|
|
|
path: hledger.zip
|
2020-03-06 22:06:15 +03:00
|
|
|
|
|
|
|
|
2020-03-06 22:21:52 +03:00
|
|
|
# Directory: C:\Users\runneradmin
|
|
|
|
#
|
|
|
|
# Mode LastWriteTime Length Name
|
|
|
|
# ---- ------------- ------ ----
|
|
|
|
# d----l 3/5/2020 7:40 PM .cargo
|
|
|
|
# d----- 3/5/2020 7:40 PM .config
|
|
|
|
# d----l 3/5/2020 7:40 PM .rustup
|
|
|
|
# d----- 3/6/2020 7:16 PM .stack
|
|
|
|
# d-r--- 3/5/2020 7:40 PM 3D Objects
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Contacts
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Desktop
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Documents
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Downloads
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Favorites
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Links
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Music
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Pictures
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Saved Games
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Searches
|
|
|
|
# d-r--- 3/5/2020 7:40 PM Videos
|
|
|
|
#
|
|
|
|
# Directory: C:\Users\runneradmin\AppData
|
|
|
|
#
|
|
|
|
# Mode LastWriteTime Length Name
|
|
|
|
# ---- ------------- ------ ----
|
|
|
|
# d----- 3/6/2020 7:16 PM Local
|
|
|
|
# d----- 3/5/2020 7:40 PM LocalLow
|
|
|
|
# d----- 3/5/2020 7:40 PM Roaming
|
|
|
|
#
|
|
|
|
# Directory: C:\Users\runneradmin\AppData\Local
|
|
|
|
#
|
|
|
|
# Mode LastWriteTime Length Name
|
|
|
|
# ---- ------------- ------ ----
|
|
|
|
# d----- 3/6/2020 7:16 PM GitHub
|
|
|
|
# d----- 3/5/2020 7:40 PM Google
|
|
|
|
# d----- 3/5/2020 7:42 PM Microsoft
|
|
|
|
# d----- 3/6/2020 7:15 PM Packages
|
|
|
|
# d----- 3/6/2020 7:17 PM Temp
|
|
|
|
#
|
|
|
|
# ls : Cannot find path 'C:\Users\runneradmin\AppData\Local\Programs\' because it does not exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-06 22:06:15 +03:00
|
|
|
# - name: Configure
|
|
|
|
# if: startsWith(matrix.name, 'windows')
|
|
|
|
# run: |
|
|
|
|
# set PATH=C:\ProgramData\scoop\shims;%PATH%
|
|
|
|
# call "${{ matrix.vcvarsall }}" x64 # Sets a whole bunch of environment variables used by the next call to cmake.
|
|
|
|
# cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug ... # Same as above (duplicated)
|
2020-03-07 13:05:27 +03:00
|
|
|
|
|
|
|
# echo "::add-path::/path/to/dir"
|