Using latest gcc to run tests #973
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: 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 | |
echo "${{ github.workspace }}/x86_64-windows-gnu/llvm/bin:${{ github.workspace }}/x86_64-windows-gnu/x86_64-windows-gnu/bin" >> $GITHUB_PATH | |
- name: Extract clang | |
uses: ihiroky/extract-action@v1 | |
with: | |
file_path: x86_64-windows-gnu.tar.xz | |
- name: Generate tests | |
run: | | |
ls | |
Get-Command clang | |
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: CMake configure for wasm64 | |
run: cmake -B fast_io_build_wasm64 -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="--target=wasm64 -lc++abi -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 |