Skip to content

windows & linux

windows & linux #29

Workflow file for this run

name: windows & linux
on:
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
name: Linux ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: amd64
flags: -m64
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
sudo dpkg --add-architecture i386
sudo apt-get update -q -y
sudo apt-get install -y gcc-multilib g++-multilib valgrind libc6-dbg libc6-dbg:i386
- name: Configure & build
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DCMAKE_C_FLAGS=${{ matrix.flags }} ..
cmake --build .
- name: Run test examples
run: |
cd build
./go_channel
./go_sleep
./go_select
./go_wait_group
./go_panic
./co_uv_fs
./co_uv_spawn
build-windows:
name: Windows (${{ matrix.arch }})
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
arch: [x64, Win32]
steps:
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- uses: actions/checkout@v3
- name: Configure & build
run: |
mkdir build
cd build
cmake .. -D BUILD_TESTING=ON -A ${{ matrix.arch }}
cmake --build . --config Release
- name: Run test examples
shell: cmd
run: |
cd build\Release
.\go_channel.exe
.\go_sleep.exe
.\go_select.exe
.\go_wait_group.exe
.\go_panic.exe
.\co_uv_fs.exe
.\co_uv_spawn.exe