Skip to content

Commit 08bac24

Browse files
committed
Merge branch 'git_build_workflow'
2 parents ba80e3b + f47cf65 commit 08bac24

3 files changed

Lines changed: 64 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*'
5+
6+
permissions:
7+
contents: write
8+
9+
env:
10+
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
11+
12+
name: build
13+
jobs:
14+
build:
15+
name: Build Koka
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macOS-latest]
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
submodules: true
24+
25+
# Set up stack and cache dependencies: https://github.com/freckle/stack-action
26+
- uses: freckle/stack-action@v5
27+
with:
28+
test: false
29+
stack-build-arguments: ""
30+
cache-save-always: true
31+
32+
- name: Build
33+
run: stack build
34+
35+
# Cache setup for vcpkg (https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache)
36+
- name: Export GitHub Actions cache environment variables
37+
uses: actions/github-script@v7
38+
with:
39+
script: |
40+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
41+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
42+
43+
- name: Run Koka Packaging
44+
run: |
45+
stack exec koka -- -e -O2 util/bundle
46+
47+
# - name: Package VSCode Extension
48+
# working-directory: support/vscode/koka.language-koka
49+
# run: |
50+
# npm install
51+
# npm run build
52+
# npm run package
53+
54+
# Create a release https://github.com/softprops/action-gh-release
55+
- name: Release
56+
uses: softprops/action-gh-release@v2
57+
with: # support/vscode/koka.language-koka/*.vsix
58+
files: |
59+
bundle/**/*.tar.gz
60+
util/install.bat
61+
util/install.sh
62+
make_latest: true

util/install.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set KOKA_HELP=N
1111
set KOKA_FORCE=N
1212
set KOKA_DIST_SOURCE=
1313
set KOKA_DIST_SOURCE_URL=
14-
set KOKA_DIST_BASE_URL=https://github.com/koka-lang/koka/releases/download
14+
set KOKA_DIST_BASE_URL=https://github.com/TimWhiting/koka/releases/download
1515
set KOKA_IEXPRESS=N
1616
set KOKA_PREV_VERSION=
1717
set KOKA_PREV_PREFIX=

util/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ OSNAME=""
1515
OSDISTRO=""
1616
VSCODE="" # set if installing from the vscode extension
1717

18-
KOKA_DIST_BASE_URL="https://github.com/koka-lang/koka/releases/download"
18+
KOKA_DIST_BASE_URL="https://github.com/TimWhiting/koka/releases/download"
1919
KOKA_DIST_URL="" # $KOKA_DIST_BASE_URL/$VERSION
2020
KOKA_DIST_SOURCE="" # $KOKA_DIST_URL/koka-$VERSION-<os>-<arch>.tar.gz
2121
KOKA_TEMP_DIR="" # empty creates one dynamically

0 commit comments

Comments
 (0)