checker: allow generic operators to be called in fn (fix #23773) (#23… #13909
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cross CI | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- '**.yml' | |
- '!**/cross_ci.yml' | |
- 'cmd/tools/**' | |
- '!cmd/tools/builders/**.v' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '**.yml' | |
- '!**/cross_ci.yml' | |
- 'cmd/tools/**' | |
- '!cmd/tools/builders/**.v' | |
concurrency: | |
group: cross-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
cross-macos: | |
runs-on: macos-13 | |
timeout-minutes: 25 | |
env: | |
VFLAGS: -cc clang | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 10 | |
- name: Build V | |
run: make -j4 && ./v symlink | |
- name: Install dependencies | |
run: | | |
./v retry -- brew install mingw-w64 | |
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/" | |
- name: Test symlink | |
run: ./v symlink | |
- name: Cross-compilation to Linux | |
run: | | |
./v -os linux cmd/v | |
# TODO: fix this: ./v -os linux examples/2048/2048.v | |
- name: Cross-compilation to Windows | |
run: | | |
./v -os windows cmd/v | |
./v -os windows examples/2048/2048.v | |
cross-linux: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 25 | |
env: | |
VFLAGS: -cc tcc -no-retry-compilation | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 10 | |
- name: Build v | |
run: make -j4 && ./v symlink | |
- name: Install dependencies | |
run: | | |
./v retry -- sudo apt install --quiet -y mingw-w64 wine wine64 winetricks libssl-dev sqlite3 libsqlite3-dev | |
- name: Show diagnostics for wine | |
run: | | |
which wine | |
ls -la $(realpath $(which wine)) | |
- name: v.c can be compiled and run with -os cross | |
run: | | |
./v -os cross -o /tmp/v.c cmd/v | |
gcc -g -std=gnu11 -w -o v_from_vc /tmp/v.c -lm -lpthread | |
ls -lart v_from_vc | |
./v_from_vc version | |
- name: v_win.c can be compiled and run with -os windows | |
run: | | |
./v -cc msvc -os windows -o /tmp/v_win.c cmd/v | |
x86_64-w64-mingw32-gcc /tmp/v_win.c -std=c99 -w -municode -o v_from_vc.exe -lws2_32 | |
ls -lart v_from_vc.exe | |
wine ./v_from_vc.exe version | |
- name: hello_world.v can be cross compiled to hello_world.exe | |
run: | | |
./v -os windows examples/hello_world.v | |
ls -lart examples/hello_world.exe | |
wine examples/hello_world.exe | |
- name: 2048.v can be cross compiled to 2048.exe | |
run: | | |
./v -os windows examples/2048/2048.v | |
ls -lart examples/2048/2048.exe | |
cross-windows: | |
runs-on: windows-2019 | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
echo %VFLAGS% | |
echo $VFLAGS | |
.\make.bat -msvc | |
- name: TODO v_win.c can be compiled and run with -os windows | |
run: | | |
.\v.exe -os windows -cc msvc -showcc -o v2.exe cmd\v | |
.\v.exe -os windows -cc msvc -o v_win.c cmd\v | |
dir v2.exe | |
dir v_win.c | |
.\v2.exe version |