From 0dcad8e27aa2ef1105b376b403d813703850ac9b Mon Sep 17 00:00:00 2001 From: cmclark00 Date: Tue, 13 Aug 2024 21:37:50 -0400 Subject: [PATCH] trying automation --- .github/workflows/workflow.yml | 67 ++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..c90f1f3 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,67 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build-linux: + name: Build on Linux + runs-on: ubuntu-latest + strategy: + matrix: + arch: [x64, arm64] + steps: + - uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Install Dependencies + run: sudo apt-get install -y cmake make gcc g++ libssl-dev + - name: Build + run: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc + make + + build-macos: + name: Build on macOS + runs-on: macos-latest + strategy: + matrix: + arch: [x64, arm64] + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: brew install cmake + - name: Build + run: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=$(if [ "${{ matrix.arch }}" == "x64" ]; then echo "x86_64"; else echo "arm64"; fi) + make + + build-windows: + name: Build on Windows + runs-on: windows-latest + strategy: + matrix: + arch: [x64, arm64] + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: | + choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' + choco install mingw + - name: Build + run: | + mkdir build + cd build + cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release + mingw32-make