diff --git a/.github/workflows/build_ubuntu.yml b/.github/workflows/build_ubuntu.yml index c028812..f045708 100644 --- a/.github/workflows/build_ubuntu.yml +++ b/.github/workflows/build_ubuntu.yml @@ -2,30 +2,45 @@ name: Build Checks on: push: - branches: [ "windows_build" ] + branches: [ "main" ] + pull_request: + branches: [ "main" ] jobs: - BuildWindows: - runs-on: windows-latest + BuildUbuntu: + runs-on: ubuntu-latest strategy: fail-fast: false + matrix: + build_type: [RelWithDebInfo] + c_compiler: [clang-19] + cpp_compiler: [clang++-19] + steps: - # - name: Checkout Repository - # uses: actions/checkout@v4 - # with: - # submodules: 'true' - - name: Setup MSYS - uses: msys2/setup-msys2@v2 - - name: Test msys - shell: msys2 {0} + - name: Install Packages run: | - ls . - - name: Test install clang - uses: msys2/setup-msys2@v2 + sudo apt update + sudo apt install libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgtk-3-dev + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 19 all + - name: Checkout Repository + uses: actions/checkout@v4 with: - update: true - install: >- - mingw-w64-clang-x86_64-clang - + submodules: 'true' + - name: Set reusable strings + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + - name: CMake Configure + run: > + cmake -B ${{ github.workspace }}/build + -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} + -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + -S ${{ github.workspace }} + - name: Cmake Build + run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} --target DummyEditor --parallel 16 diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index cd5a7d2..7f3cd5e 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -2,45 +2,37 @@ name: Build Checks on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + branches: [ "windows_build" ] jobs: - BuildUbuntu: - runs-on: ubuntu-latest + BuildWindows: + runs-on: windows-latest strategy: fail-fast: false - matrix: - build_type: [RelWithDebInfo] - c_compiler: [clang-19] - cpp_compiler: [clang++-19] - steps: - - name: Install Packages - run: | - sudo apt update - sudo apt install libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgtk-3-dev - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh 19 all - name: Checkout Repository uses: actions/checkout@v4 with: submodules: 'true' - - name: Set reusable strings - id: strings - shell: bash + - name: Setup MSYS + uses: msys2/setup-msys2@v2 + - name: Test msys + shell: msys2 {0} run: | - echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - - name: CMake Configure - run: > - cmake -B ${{ steps.strings.outputs.build-output-dir }} - -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} - -DCMAKE_C_COMPILER=${{ matrix.c_compiler }} - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} - -S ${{ github.workspace }} - - name: Cmake Build - run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --target DummyEditor --parallel 16 + ls . + - name: Test install clang + uses: msys2/setup-msys2@v2 + with: + update: true + install: >- + mingw-w64-clang-x86_64-clang + - name: Build Project + uses: threeal/cmake-action@v2.0.0 + with: + source-dir: ${{ github.workspace }} + build-dir: ${{ github.workspace }}/build + generator: Ninja + cxx-compiler: clang++ + c-compiler: clang