Skip to content

Commit

Permalink
Add GitHub Actions workflows for building XCPlite on Linux and Mac (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlorian-de authored Mar 28, 2024
1 parent 69fc9f7 commit 65158d1
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -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/*.*

0 comments on commit 65158d1

Please sign in to comment.