Skip to content

Commit

Permalink
tmp: don't build
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Nov 11, 2024
1 parent 08538f0 commit 62d704f
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 58 deletions.
110 changes: 55 additions & 55 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,58 @@ jobs:
shell: bash
steps:
- run: curl --version
# - 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
# runs-on: windows-latest
# env:
# VFLAGS: -cg -cc gcc
# 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
# - run: ls ~/.vmodules/vibe/curl/libcurl/bin
# - run: |
# $env:PATH += ";C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin"
# [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin", [System.EnvironmentVariableTarget]::Machine)
# [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::Machine)
# - name: Run tests
# # echo $HOME
# # [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::Machine)
# # v -stats test vibe
# # set PATH=%PATH%;C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin
# # echo %PATH%
# run: |
# $env:PATH += ";C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin"
# [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin", [System.EnvironmentVariableTarget]::Machine)
# [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::Machine)
# cd ~/.vmodules
# v -stats test vibe/src/_tests_get_test.v
- 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
runs-on: windows-latest
env:
VFLAGS: -cg -cc gcc
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
- run: ls ~/.vmodules/vibe/curl/libcurl/bin
# - run: |
# $env:PATH += ";C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin"
# [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin", [System.EnvironmentVariableTarget]::Machine)
# [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::Machine)
- name: Run tests
# echo $HOME
# [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::Machine)
# v -stats test vibe
# set PATH=%PATH%;C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin
# echo %PATH%
run: |
# $env:PATH += ";C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin"
# [System.Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:%HOMEPATH%\.vmodules\vibe\curl\libcurl\bin", [System.EnvironmentVariableTarget]::Machine)
# [System.Environment]::GetEnvironmentVariable("PATH", [System.EnvironmentVariableTarget]::Machine)
cd ~/.vmodules
v -stats test vibe/src/_tests_get_test.v
9 changes: 6 additions & 3 deletions curl/lib.v
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ module curl
import instructions
import state

#flag -I@VMODROOT/curl/libcurl/include
#include "curl/curl.h"
// #flag -I@VMODROOT/curl/libcurl/include
// #include "curl/curl.h"

#flag windows @VMODROOT/curl/libcurl/bin/libcurl-x64.dll
// #flag windows @VMODROOT/curl/libcurl/bin/libcurl-x64.dll
$if !windows {
#flag -L@VMODROOT/curl/libcurl
#flag -lcurl
}

#flag -lcurl
#include <curl/curl.h>

pub type Handle = C.CURL

pub type LinkedList = C.curl_slist
Expand Down

0 comments on commit 62d704f

Please # to comment.