From 62d704f7621583b788b4d33587fee011213e8563 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Mon, 11 Nov 2024 05:58:01 +0100 Subject: [PATCH] tmp: don't build --- .github/workflows/windows.yml | 110 +++++++++++++++++----------------- curl/lib.v | 9 ++- 2 files changed, 61 insertions(+), 58 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 8faad56..0ffb0e7 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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 diff --git a/curl/lib.v b/curl/lib.v index d892307..1ea856e 100644 --- a/curl/lib.v +++ b/curl/lib.v @@ -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 + pub type Handle = C.CURL pub type LinkedList = C.curl_slist