Skip to content

Commit

Permalink
Merge branch 'git_build_workflow'
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWhiting committed Jan 18, 2025
2 parents ba80e3b + f47cf65 commit 08bac24
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
on:
push:
tags:
- 'v*'

permissions:
contents: write

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

name: build
jobs:
build:
name: Build Koka
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true

# Set up stack and cache dependencies: https://github.com/freckle/stack-action
- uses: freckle/stack-action@v5
with:
test: false
stack-build-arguments: ""
cache-save-always: true

- name: Build
run: stack build

# Cache setup for vcpkg (https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache)
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Run Koka Packaging
run: |
stack exec koka -- -e -O2 util/bundle
# - name: Package VSCode Extension
# working-directory: support/vscode/koka.language-koka
# run: |
# npm install
# npm run build
# npm run package

# Create a release https://github.com/softprops/action-gh-release
- name: Release
uses: softprops/action-gh-release@v2
with: # support/vscode/koka.language-koka/*.vsix
files: |
bundle/**/*.tar.gz
util/install.bat
util/install.sh
make_latest: true
2 changes: 1 addition & 1 deletion util/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set KOKA_HELP=N
set KOKA_FORCE=N
set KOKA_DIST_SOURCE=
set KOKA_DIST_SOURCE_URL=
set KOKA_DIST_BASE_URL=https://github.com/koka-lang/koka/releases/download
set KOKA_DIST_BASE_URL=https://github.com/TimWhiting/koka/releases/download
set KOKA_IEXPRESS=N
set KOKA_PREV_VERSION=
set KOKA_PREV_PREFIX=
Expand Down
2 changes: 1 addition & 1 deletion util/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ OSNAME=""
OSDISTRO=""
VSCODE="" # set if installing from the vscode extension

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

0 comments on commit 08bac24

Please sign in to comment.