Skip to content

Using latest gcc to run tests #980

Using latest gcc to run tests

Using latest gcc to run tests #980

Workflow file for this run

name: C/C++ CI
on:
push:
branches: ["master", "next"]
pull_request:
branches: ["master", "next"]
jobs:
# ubuntu:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install ninja-build tool
# uses: seanmiddleditch/gha-setup-ninja@v5
# - name: Download latest gcc
# run: |
# wget --quiet https://github.com/trcrsired/gcc-releases/releases/download/20241217-x86_64-linux-gnu/x86_64-linux-gnu.tar.xz
# tar -xf x86_64-linux-gnu.tar.xz
# ln x86_64-linux-gnu/bin/gcc x86_64-linux-gnu/bin/cc
# echo "PATH=${{ github.workspace }}/x86_64-linux-gnu/bin:$PATH" >> $GITHUB_ENV
# - name: Generate tests
# run: |
# cmake -B fast_io_prebuild -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=On -DTESTS_PREBUILD=On
# cmake --build fast_io_prebuild
# ./fast_io_prebuild/tests_prebuild linux
# - name: CMake configure
# run: cmake -B fast_io_build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Werror" -DENABLE_TESTS=On
# - name: CMake build
# run: cmake --build fast_io_build
# - name: CMake test
# run: cmake --build fast_io_build --target test
# windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - uses: ilammy/[email protected]
# - name: Generate tests
# run: |
# cmake -B fast_io_prebuild -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=On -DTESTS_PREBUILD=On
# cmake --build fast_io_prebuild
# ./fast_io_prebuild/tests_prebuild windows msvc
# - name: CMake configure
# run: cmake -B fast_io_build -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_CXX_FLAGS="/EHsc /W3 /WX /sdl" -DENABLE_TESTS=On
# - name: CMake build
# run: cmake --build fast_io_build
# - name: CMake test
# run: cmake --build fast_io_build --target test
multiplatform-cross:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v5
- name: Download latest clang
run: |
Invoke-WebRequest -Uri https://github.com/trcrsired/llvm-releases/releases/download/llvm20-20250125/x86_64-windows-gnu.tar.xz -OutFile x86_64-windows-gnu.tar.xz
7z x x86_64-windows-gnu.tar.xz
7z x x86_64-windows-gnu.tar
"PATH=${{ github.workspace }}\x86_64-windows-gnu\llvm\bin;${{ github.workspace }}\x86_64-windows-gnu\x86_64-windows-gnu\bin;$env:PATH" >> $env:GITHUB_ENV
- name: Generate tests
run: |
cmake -B fast_io_prebuild -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=On -DTESTS_PREBUILD=On
cmake --build fast_io_prebuild
./fast_io_prebuild/tests_prebuild all
- name: Download sysroot for wasm64
run: |
Invoke-WebRequest -Uri https://github.com/trcrsired/wasm64-wasi-sysroot/releases/download/20240115/wasm64-wasi.tar.xz -OutFile wasm64-wasi.tar.xz
7z x wasm64-wasi.tar.xz
7z x wasm64-wasi.tar
- name: CMake configure for wasm64
run: cmake -B fast_io_build_wasm64 -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="--target=wasm64 --sysroot=wasm64-wasi -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Werror" -DENABLE_TESTS=On && cmake --build fast_io_build_wasm64
- name: Cmake compile for aarch64-linux-gnu
run: cmake -B fast_io_build_aarch64 -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="--target=aarch64-linux-gnu -lc++abi -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Werror" -DENABLE_TESTS=On && cmake --build fast_io_build_aarch64
- name: Cmake compile for loongarch64-linux-gnu
run: cmake -B fast_io_build_loongarch64 -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="--target=loongarch64-linux-gnu -lc++abi -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Werror" -DENABLE_TESTS=On && cmake --build fast_io_build_loongarch64
- name: Cmake compile for riscv64-linux-gnu
run: cmake -B fast_io_build_riscv64 -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="--target=riscv64-linux-gnu -lc++abi -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Werror" -DENABLE_TESTS=On && cmake --build fast_io_build_riscv64
# windows-wasm-cross:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install ninja-build tool
# uses: seanmiddleditch/gha-setup-ninja@v5
# - name: Download latest clang and wavm tar package
# run: |
# Invoke-WebRequest -Uri https://github.com/trcrsired/llvm-releases/releases/download/llvm20-20250125/x86_64-windows-gnu.tar.xz -OutFile llvm/x86_64-windows-gnu.tar.xz
# Invoke-WebRequest -Uri https://github.com/trcrsired/wavm-release/releases/download/20250125/x86_64-windows-gnu.tar.xz -OutFile wavm/x86_64-windows-gnu.tar.xz
# - name: Extract clang and wavm
# uses: a7ul/[email protected]
# with:
# command: xf
# files: llvm/x86_64-windows-gnu.tar.xz wavm/x86_64-windows-gnu.tar.xz