diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..185a677 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,85 @@ +name: build + +on: + push: + branches: [ master ] + +jobs: + build-win: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup MSVC + uses: TheMrMilchmann/setup-msvc-dev@v2 + with: + arch: x86 + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build + -DCMAKE_BUILD_TYPE=Release + -A Win32 + + - name: Build + run: cmake --build ${{github.workspace}}/build --parallel --config Release + - uses: actions/upload-artifact@v3 + with: + name: windows-x86 + path: ${{github.workspace}}/build/Release/ + + build-win-64: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Setup MSVC + uses: TheMrMilchmann/setup-msvc-dev@v2 + with: + arch: x64 + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build + -DCMAKE_BUILD_TYPE=Release + -A x64 + + - name: Build + run: cmake --build ${{github.workspace}}/build --parallel --config Release + - uses: actions/upload-artifact@v3 + with: + name: windows-x64 + path: ${{github.workspace}}/build/Release/ + + + build-lin: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install libraries + run: sudo apt update && sudo apt install libgl-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev + + - name: Install Ninja + uses: ashutoshvarma/setup-ninja@master + with: + version: 1.11.0 + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -GNinja + -DCMAKE_CXX_COMPILER=g++-11 + -DCMAKE_C_COMPILER=gcc-11 + -DCMAKE_BUILD_TYPE=Release + #-DCMAKE_CXX_STANDARD=${{matrix.cxx_standard}} + - name: Build + run: cmake --build ${{github.workspace}}/build --parallel + - uses: actions/upload-artifact@v3 + with: + name: linux-x64 + path: ${{github.workspace}}/build/*AddIn.so