diff --git a/.github/macos_build.sh b/.github/macos_build.sh new file mode 100644 index 0000000..09c553a --- /dev/null +++ b/.github/macos_build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Create build directory and enter it +mkdir bin +cd bin +# Create internal build and install directory, then enter it +mkdir build +mkdir install +cd build + +# Build in Release mode +cmake -DCMAKE_BUILD_TYPE=Release ../.. +cmake --build . +cmake --install . --prefix=../install + +# Back to root directory +cd .. +cd .. diff --git a/.github/windows_build.bat b/.github/windows_build.bat index e4e22c7..fdba5d7 100644 --- a/.github/windows_build.bat +++ b/.github/windows_build.bat @@ -11,7 +11,7 @@ CD build :: Build with x64 architecture in Release mode cmake -A x64 ../.. cmake --build . --config Release -cmake --install . --prefix=../install --config Relese +cmake --install . --prefix=../install --config Release :: Back to root directory CD .. diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..d456294 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,46 @@ +name: YYCC Linux Build + +on: [workflow_dispatch] + +jobs: + linux-build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: Install Dependencies + run: | + sudo apt update + sudo apt install -y build-essential cmake git + # - name: Setup Google Test and Google Benchmark + # run: | + # # Setup Google Test + # git clone -b v1.17.0 https://github.com/google/googletest.git external/googletest + # cd external/googletest + # mkdir build install + # cd build + # cmake -DCMAKE_CXX_STANDARD=23 -Dgtest_force_shared_crt=ON -DCMAKE_BUILD_TYPE=Release .. + # cmake --build . + # cmake --install . --prefix=../install + # cd ../.. + # # Setup Google Benchmark + # git clone -b v1.9.4 https://github.com/google/benchmark.git external/benchmark + # cd external/benchmark + # # Create symlink to googletest as required by benchmark + # ln -s ../googletest googletest + # mkdir build install + # cd build + # cmake -DCMAKE_CXX_STANDARD=23 -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release .. + # cmake --build . + # cmake --install . --prefix=../install + # cd ../.. + - name: Build YYCC + run: | + ./.github/linux_build.sh + - name: Upload Built Artifact + uses: actions/upload-artifact@v4 + with: + name: YYCC-linux-build + path: bin/install/* + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..b82cd5b --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,42 @@ +name: YYCC macOS Build + +on: [workflow_dispatch] + +jobs: + macos-build: + runs-on: macos-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + # - name: Setup Google Test and Google Benchmark + # run: | + # # Setup Google Test + # git clone -b v1.17.0 https://github.com/google/googletest.git external/googletest + # cd external/googletest + # mkdir build install + # cd build + # cmake -DCMAKE_CXX_STANDARD=23 -Dgtest_force_shared_crt=ON -DCMAKE_BUILD_TYPE=Release .. + # cmake --build . + # cmake --install . --prefix=../install + # cd ../.. + # # Setup Google Benchmark + # git clone -b v1.9.4 https://github.com/google/benchmark.git external/benchmark + # cd external/benchmark + # # Create symlink to googletest as required by benchmark + # ln -s ../googletest googletest + # mkdir build install + # cd build + # cmake -DCMAKE_CXX_STANDARD=23 -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release .. + # cmake --build . + # cmake --install . --prefix=../install + # cd ../.. + - name: Build YYCC + run: | + ./.github/macos_build.sh + - name: Upload Built Artifact + uses: actions/upload-artifact@v4 + with: + name: YYCC-macos-build + path: bin/install/* + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/nightly.yml.disabled b/.github/workflows/nightly.yml.disabled deleted file mode 100644 index 113ba8b..0000000 --- a/.github/workflows/nightly.yml.disabled +++ /dev/null @@ -1,35 +0,0 @@ -name: YYCC Nightly Build - -on: - workflow_dispatch: - push: - branches: - - master - -jobs: - msvc-build: - - strategy: - matrix: - vs: ['2019'] - msvc_arch: ['x86'] - - runs-on: windows-2019 - - steps: - - name: Fetching Repository - uses: actions/checkout@v3 - - name: Building YYCC - shell: cmd - run: | - set VS=${{ matrix.vs }} - set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" - if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" - call %VCVARS% ${{ matrix.msvc_arch }} - .\script\build.bat - - name: Uploading Nightly Build - uses: actions/upload-artifact@v3 - with: - name: YYCC-windows-nightly - path: bin/install/* - retention-days: 30 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..7fcdfab --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,55 @@ +name: YYCC Windows Build + +on: [workflow_dispatch] + +jobs: + windows-build: + + strategy: + matrix: + include: + - vs: '2022' + msvc_arch: 'x64' + + runs-on: windows-2022 + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + # - name: Setup Google Test and Google Benchmark + # run: | + # # Setup Google Test + # git clone -b v1.17.0 https://github.com/google/googletest.git external/googletest + # cd external/googletest + # mkdir build install + # cd build + # cmake -DCMAKE_CXX_STANDARD=23 -Dgtest_force_shared_crt=ON -DCMAKE_BUILD_TYPE=Release .. + # cmake --build . --config Release + # cmake --install . --prefix=../install --config Release + # cd ../.. + # # Setup Google Benchmark + # git clone -b v1.9.4 https://github.com/google/benchmark.git external/benchmark + # cd external/benchmark + # # Create symlink to googletest as required by benchmark + # mklink /D googletest ../googletest + # mkdir build install + # cd build + # cmake -DCMAKE_CXX_STANDARD=23 -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release .. + # cmake --build . --config Release + # cmake --install . --prefix=../install --config Release + # cd ../.. + - name: Build YYCC + shell: cmd + run: | + set VS=${{ matrix.vs }} + set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" + if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" + call %VCVARS% ${{ matrix.msvc_arch }} + .\.github\windows_build.bat + - name: Upload Built Artifact + uses: actions/upload-artifact@v4 + with: + name: YYCC-windows-build + path: bin/install/* + retention-days: 30 + \ No newline at end of file