Skip to content

Commit

Permalink
ci(wip): add windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Nov 9, 2024
1 parent 5448f4e commit 778fcb2
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ concurrency:
cancel-in-progress: true

jobs:
linux:
uses: ./.github/workflows/linux.yml
# linux:
# uses: ./.github/workflows/linux.yml
#
# macos:
# uses: ./.github/workflows/macos.yml

macos:
uses: ./.github/workflows/macos.yml
windows:
uses: ./.github/workflows/windows.yml
63 changes: 63 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: CI

on:
workflow_call:

jobs:
setup:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- name: Setup V
run: |
curl -Lo v_windows.zip https://github.com/vlang/v/releases/latest/download/v_windows.zip
7z x v_windows.zip
mv v ~/v
~/v/v symlink
- run: v -showcc self && v doctor
- uses: actions/checkout@v4
with:
path: vibe
- name: Setup V module
run: |
mv vibe ~/.vmodules/vibe
v ~/.vmodules/vibe/curl/build.vsh --silent
- name: Save cache
uses: actions/cache/save@v4
with:
path: |
~/v
~/.vmodules
key: ${{ runner.os }}-${{ github.sha }}

test:
needs: setup
strategy:
matrix:
cc: [tcc, gcc, msvc]
optimization: ['', '-W -cstrict']
exclude:
- cc: tcc
optimization: '-W -cstrict'
fail-fast: false
runs-on: windows-latest
env:
VFLAGS: -cg -cc ${{ matrix.cc }} ${{ matrix.optimization }}
steps:
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/v
~/.vmodules
key: ${{ runner.os }}-${{ github.sha }}
fail-on-cache-miss: true
- name: Setup V
run: ~/v/v symlink
- name: Run tests
run: |
cd ~/.vmodules
ls vibe/src
v -stats test vibe/src/_tests_get_test.v

0 comments on commit 778fcb2

Please sign in to comment.