From 65158d1ca832c6ff0b9426907c254bb38115df80 Mon Sep 17 00:00:00 2001 From: Vlorian <64640147+vlorian-de@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:45:44 +0100 Subject: [PATCH] Add GitHub Actions workflows for building XCPlite on Linux and Mac (#48) --- .github/workflows/default.yml | 71 +++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/default.yml diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml new file mode 100644 index 0000000..13a9c9c --- /dev/null +++ b/.github/workflows/default.yml @@ -0,0 +1,71 @@ +name: XCPlite Default + +on: + workflow_dispatch: + push: + branches: ["**"] + tags: ["**"] + +concurrency: + group: ${{ (github.ref == 'refs/heads/master') && 'master' || format('{0}-{1}', github.workflow, github.ref) }} # concurrency does not include master branch + cancel-in-progress: true + +jobs: + ##################################################################################################################### + # # + # Build on Linux # + # # + ##################################################################################################################### + build_on_linux: + runs-on: [ubuntu-22.04] + name: Build on Linux + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Build Tools + run: | + sudo apt-get install cmake g++ clang ninja-build + + - name: Build XCPlite + run: | + cd C_Demo + cmake -DCMAKE_BUILD_TYPE=Release -S . -B build + cd build + make + - name: C_Demo - Provide Build Artifacts (Linux) + uses: actions/upload-artifact@v4 + if: always() + with: + name: C_Demo build artifacts (Linux) + path: ./C_Demo/build/*.* + + + ##################################################################################################################### + # # + # Build on Mac # + # # + ##################################################################################################################### + build_on_mac: + runs-on: [macos-13] + name: Build on Mac + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Build Tools + run: + brew install cmake gcc + + - name: Build XCPlite + run: | + cd C_Demo + cmake -DCMAKE_BUILD_TYPE=Release -S . -B build + cd build + make + - name: C_Demo - Provide Build Artifacts (MacOS) + uses: actions/upload-artifact@v4 + if: always() + with: + name: C_Demo build artifacts (MacOS) + path: ./C_Demo/build/*.* \ No newline at end of file