Skip to content

Commit 75109d0

Browse files
committed
[ git ] Merge branch 'prebuilt' into dev
2 parents c49365f + 6bf934b commit 75109d0

File tree

4 files changed

+306
-0
lines changed

4 files changed

+306
-0
lines changed

.github/workflows/release.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# modified from https://github.com/simonmichael/hledger/blob/master/.github/workflows/release.yml
2+
3+
# Creates a draft github release.
4+
# See https://github.com/actions/create-release, still pretty rough as of 20200609.
5+
# see also: https://github.com/marketplace/actions/tag-release-on-push-action
6+
7+
name: Release
8+
9+
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
10+
on:
11+
push:
12+
tags:
13+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
14+
15+
jobs:
16+
release:
17+
name: Create Github Release
18+
if: contains(github.ref, 'tags/v')
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Create Release
22+
id: create_release
23+
uses: actions/[email protected]
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
with:
27+
tag_name: ${{ github.ref }}
28+
release_name: ${{ github.ref }}
29+
draft: false
30+
prerelease: false

.github/workflows/test-linux.yaml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# modified from https://github.com/simonmichael/hledger/blob/master/.github/workflows/linux.yml
2+
3+
name: CI (Linux)
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
12+
- name: 📥 Checkout repository
13+
uses: actions/checkout@v2
14+
15+
# things to be cached/restored:
16+
17+
- name: 💾 Cache stack global package db
18+
id: stack-global
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.stack
22+
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
23+
restore-keys: |
24+
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
25+
- name: 💾 Cache stack-installed programs in ~/.local/bin
26+
id: stack-programs
27+
uses: actions/cache@v2
28+
with:
29+
path: ~/.local/bin
30+
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
31+
restore-keys: |
32+
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
33+
- name: 💾 Cache .stack-work
34+
uses: actions/cache@v2
35+
with:
36+
path: .stack-work
37+
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
40+
- name: 💾 Cache agda-language-server/.stack-work
41+
uses: actions/cache@v2
42+
with:
43+
path: agda-language-server/.stack-work
44+
key: ${{ runner.os }}-agda-language-server-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('agda-language-server/package.yaml') }}
45+
restore-keys: |
46+
${{ runner.os }}-agda-language-server-stack-work-${{ matrix.plan.ghc }}
47+
48+
49+
# actions:
50+
51+
- name: ⏬ Install stack
52+
run: |
53+
mkdir -p ~/.local/bin
54+
export PATH=~/.local/bin:$PATH
55+
# curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
56+
if [[ ! -x ~/.local/bin/stack ]]; then curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
57+
stack --version
58+
- name: ⏬ Install GHC
59+
run: |
60+
df -h
61+
stack setup --install-ghc
62+
df -h
63+
64+
- name: ⏬ Install haskell deps
65+
run: |
66+
stack build --only-dependencies
67+
68+
- name: 🔨 Build and run tests
69+
run: |
70+
stack test
71+
72+
# artifacts:
73+
- name: 📦 Install & Gather executables
74+
id: exes
75+
run: |
76+
stack install
77+
cp ~/.local/bin/als .
78+
zip -r als als
79+
mv als.zip als-ubuntu.zip
80+
81+
- name: 🚢 Release Artifacts
82+
uses: softprops/action-gh-release@v1
83+
if: startsWith(github.ref, 'refs/tags/') # so that only commits with a git tag would upload artifacts
84+
with:
85+
files: als-ubuntu.zip
86+
draft: true
87+
prerelease: true
88+
env:
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-mac.yaml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# modified from https://github.com/simonmichael/hledger/blob/master/.github/workflows/mac.yml
2+
3+
name: CI (macOS)
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
build:
9+
runs-on: macos-latest
10+
steps:
11+
12+
- name: 📥 Checkout repository
13+
uses: actions/checkout@v2
14+
15+
# things to be cached/restored:
16+
17+
- name: 💾 Cache stack global package db
18+
id: stack-global
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.stack
22+
key: ${{ runner.os }}-stack-global-after20210110-${{ hashFiles('**.yaml') }}
23+
restore-keys: |
24+
${{ runner.os }}-stack-global-after202110110
25+
- name: 💾 Cache stack-installed programs in ~/.local/bin
26+
id: stack-programs
27+
uses: actions/cache@v2
28+
with:
29+
path: ~/.local/bin
30+
key: ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
31+
restore-keys: |
32+
${{ runner.os }}-stack-programs
33+
- name: 💾 Cache .stack-work
34+
uses: actions/cache@v2
35+
with:
36+
path: .stack-work
37+
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-stack-work
40+
- name: 💾 Cache agda-language-server/.stack-work
41+
uses: actions/cache@v2
42+
with:
43+
path: agda-language-server/.stack-work
44+
key: ${{ runner.os }}-agda-language-server-stack-work-${{ hashFiles('agda-language-server/package.yaml') }}
45+
restore-keys: |
46+
${{ runner.os }}-agda-language-server-stack-work
47+
48+
# actions:
49+
50+
- name: ⏬ Install stack
51+
run: |
52+
mkdir -p ~/.local/bin
53+
export PATH=~/.local/bin:$PATH
54+
# brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
55+
if [[ ! -x ~/.local/bin/stack ]]; then brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
56+
stack --version
57+
- name: ⏬ Install GHC
58+
run: |
59+
stack setup --install-ghc
60+
61+
- name: ⏬ Install haskell deps
62+
run: |
63+
stack build --only-dependencies
64+
65+
- name: 🔨 Build and run tests
66+
run: |
67+
stack test
68+
69+
70+
# artifacts:
71+
72+
- name: 📦 Install & Gather executables
73+
id: exes
74+
run: |
75+
stack install
76+
cp ~/.local/bin/als .
77+
zip -r als als
78+
mv als.zip als-macos.zip
79+
80+
- name: 🚢 Release Artifacts
81+
uses: softprops/action-gh-release@v1
82+
if: startsWith(github.ref, 'refs/tags/') # so that only commits with a git tag would upload artifacts
83+
with:
84+
files: als-macos.zip
85+
draft: true
86+
prerelease: true
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-windows.yaml

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# modified from https://github.com/simonmichael/hledger/blob/master/.github/workflows/windows.yml
2+
3+
name: CI (Windows)
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
steps:
11+
12+
- name: 📥 Checkout repository
13+
uses: actions/checkout@v2
14+
15+
# things to be cached/restored:
16+
17+
- name: 💾 Cache stack global package db
18+
id: stack-global-package-db
19+
uses: actions/cache@v2
20+
with:
21+
path: C:\Users\runneradmin\AppData\Roaming\stack\
22+
key: ${{ runner.os }}-appdata-roaming-stack-${{ hashFiles('**.yaml') }}
23+
restore-keys: |
24+
${{ runner.os }}-appdata-roaming-stack
25+
- name: 💾 Cache stack programs dir # ghc, ghc-included packages and their haddocks, mingw, msys2
26+
id: stack-programs-dir
27+
uses: actions/cache@v2
28+
with:
29+
path: C:\Users\runneradmin\AppData\Local\Programs\stack\
30+
# which files signal a change in stack's global db ?
31+
# **.yaml includes */package.yaml and stack.yaml* (too many), and hopefully no other changing yamls
32+
key: ${{ runner.os }}-appdata-local-programs-stack-${{ hashFiles('**.yaml') }}
33+
restore-keys: |
34+
${{ runner.os }}-appdata-local-programs-stack
35+
- name: 💾 Cache .stack-work
36+
uses: actions/cache@v2
37+
with:
38+
path: .stack-work
39+
key: ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
40+
restore-keys: |
41+
${{ runner.os }}-stack-work
42+
- name: 💾 Cache agda-language-server/.stack-work
43+
uses: actions/cache@v2
44+
with:
45+
path: agda-language-server/.stack-work
46+
key: ${{ runner.os }}-agda-language-server-stack-work-${{ hashFiles('agda-language-server/package.yaml') }}
47+
restore-keys: |
48+
${{ runner.os }}-agda-language-server-stack-work
49+
50+
# actions
51+
52+
- name: ⏬ Install stack
53+
#if: steps.stack-programs-dir.outputs.cache-hit != 'true'
54+
# this step is needed to get stack.exe into PATH, for now
55+
run: |
56+
curl -sL https://get.haskellstack.org/stable/windows-x86_64.zip -o stack.zip
57+
7z x stack.zip stack.exe
58+
which stack
59+
stack --version
60+
which ./stack
61+
./stack --version
62+
# must avoid GHC versions broken on windows such as 8.8.3 with https://gitlab.haskell.org/ghc/ghc/issues/17926
63+
# current default stack.yaml uses GHC 8.8.4 which hopefully is ok
64+
65+
- name: ⏬ Install GHC
66+
# if: steps.stack-programs-dir.outputs.cache-hit != 'true'
67+
# set PATH=C:\Users\runneradmin\AppData\Local\Programs\stack\local\bin;%PATH%
68+
run: |
69+
./stack --no-terminal setup --install-ghc
70+
71+
- name: 📸 Build Snapshot
72+
run: |
73+
./stack build --no-terminal --bench --only-snapshot
74+
75+
- name: 🧰 Build Dependencies
76+
run: |
77+
./stack build --no-terminal --only-dependencies
78+
79+
- name: 🔨 Build and run tests
80+
run: |
81+
./stack test
82+
83+
# artifacts:
84+
85+
- name: 📦 Install & Gather executables
86+
run: |
87+
./stack install
88+
copy C:\Users\runneradmin\AppData\Roaming\local\bin\als.exe .
89+
powershell Compress-Archive als.exe als-windows.zip
90+
91+
- name: 🚢 Release Artifacts
92+
uses: softprops/action-gh-release@v1
93+
if: startsWith(github.ref, 'refs/tags/') # so that only commits with a git tag would upload artifacts
94+
with:
95+
files: als-windows.zip
96+
draft: true
97+
prerelease: true
98+
env:
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)