Skip to content

Commit

Permalink
try override vcpkg root
Browse files Browse the repository at this point in the history
  • Loading branch information
daanx committed Jan 23, 2025
1 parent 1cf663a commit dfb0274
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions .github/workflows/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ jobs:
os: [windows-latest, macOS-latest, macOS-13, ubuntu-20.04, ubuntu-22.04-arm]

steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true

# Debug
- name: Environment
if: runner.os == 'Windows' && runner.arch == 'X64'
run: ls env:*

# Cache setup for vcpkg (https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-actions-cache)
- name: Setup vcpkg cache
uses: actions/github-script@v7
Expand All @@ -47,21 +43,6 @@ jobs:
with:
arch: x64

# Set vcpkg root on Windows
- name: Setup vcpkg root
uses: actions/github-script@v7
if: runner.os == 'Windows' && runner.arch == 'X64'
run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Environment
if: runner.os == 'Windows' && runner.arch == 'X64'
run: ls env:*

- name: Debug CL
if: runner.os == 'Windows' && runner.arch == 'X64'
run: cl --version


# Set up stack and cache dependencies: https://github.com/freckle/stack-action (MIT license)
- name: Setup stack
uses: freckle/stack-action@v5
Expand All @@ -70,20 +51,31 @@ jobs:
stack-build-arguments: ""
cache-save-always: true

# Build compiler
- name: Build compiler
run: stack build
run: |
stack build
# Bundle
- name: Build libraries
if: runner.os == 'Windows'
run: |
$env:VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT
stack exec koka -- -e -O2 util/bundle
- name: Build libraries
if: runner.os != 'Windows'
run: |
stack exec koka -- -e -O2 util/bundle
# VS code extension
- name: Package VS code extension
if: runner.os == 'Windows' && runner.arch == 'X64'
working-directory: support/vscode/koka.language-koka
run: |
npm install
npm run build
- name: Bundle compiler and libraries
run: |
stack exec koka -- -e -O2 util/bundle
# Create a release: https://github.com/softprops/action-gh-release (MIT license)
- name: Release
uses: softprops/action-gh-release@v2
Expand Down

0 comments on commit dfb0274

Please sign in to comment.