Skip to content

Commit

Permalink
add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bollenn committed Jun 12, 2024
1 parent 340ceb9 commit bb89305
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Build

on:
push:
branches: [main]
tags:
- '*'
pull_request:
branches: [main]

jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cmake -S ${{github.workspace}}/MeLiBu_low_level -B ${{github.workspace}}/MeLiBu_low_level/build -A x64
cmake --build ${{github.workspace}}/MeLiBu_low_level/build --config Release
- name: Upload windows build
uses: actions/upload-artifact@v2
with:
name: windows
path: ${{github.workspace}}/MeLiBu_low_level/build/Analyzers/Release/*.dll
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cmake -S ${{github.workspace}}/MeLiBu_low_level -B ${{github.workspace}}/MeLiBu_low_level/build/x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=x86_64
cmake --build ${{github.workspace}}/MeLiBu_low_level/build/x86_64
cmake -S ${{github.workspace}}/MeLiBu_low_level -B ${{github.workspace}}/MeLiBu_low_level/build/arm64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64
cmake --build ${{github.workspace}}/MeLiBu_low_level/build/arm64
- name: Upload MacOS x86_64 build
uses: actions/upload-artifact@v2
with:
name: macos_x86_64
path: ${{github.workspace}}/MeLiBu_low_level/build/x86_64/Analyzers/*.so
- name: Upload MacOS arm64 build
uses: actions/upload-artifact@v2
with:
name: macos_arm64
path: ${{github.workspace}}/MeLiBu_low_level/build/arm64/Analyzers/*.so
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
cmake -S ${{github.workspace}}/MeLiBu_low_level -B ${{github.workspace}}/MeLiBu_low_level/build -DCMAKE_BUILD_TYPE=Release
cmake --build ${{github.workspace}}/MeLiBu_low_level/build
env:
CC: gcc-10
CXX: g++-10
- name: Upload Linux build
uses: actions/upload-artifact@v2
with:
name: linux
path: ${{github.workspace}}/MeLiBu_low_level/build/Analyzers/*.so
publish:
needs: [windows, macos, linux]
runs-on: ubuntu-latest
steps:
- name: download individual builds
uses: actions/download-artifact@v2
with:
path: ${{github.workspace}}/artifacts
- name: zip
run: |
cd ${{github.workspace}}/artifacts
zip -r ${{github.workspace}}/analyzer.zip .
- uses: actions/upload-artifact@v2
with:
name: all-platforms
path: ${{github.workspace}}/artifacts/**
- name: create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/analyzer.zip

0 comments on commit bb89305

Please sign in to comment.