Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
pd3v committed Jul 23, 2024
1 parent 1456733 commit 61bcd1d
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 108 deletions.
75 changes: 41 additions & 34 deletions .github/workflows/cmake+submodule.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,48 @@
name: Release Build
name: mglyphs Release Build

on:
push:
branches: [main]
branches:
- main
pull_request:
branches: [main]
types: [closed]
branches:
- main
workflow_dispatch:

jobs:
# Build for macOs
release_macos:
name: macOS cppandaction+diatonic lib release
runs-on: macos-11

linux_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Create Build Directory
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
run: cmake -S . -B build -DGIT_ACTION=TRUE -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build ./build --config Release

- name: Create Artifact
run: |
mkdir release
# cp build/examples release/examples
cp -r build/externals release/externals
- name: Publish macOS Artifact
uses: actions/upload-artifact@v2
with:
name: intervals macOS release
path: release
- name: Checkout
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive --remote
- name: Build Directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Run CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ./build --config Release
- name: mglyphs Linux Artifact
uses: actions/upload-artifact@v4
with:
name: mglyphs_v0.2_linux
path: ${{github.workspace}}/
macos_build:
runs-on: macos-latest
steps:
- name: Checkout
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive --remote
- name: Build Directory
run: cmake -E make_directory ${{github.workspace}}/build
- name: Run CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ./build --config Release
- name: mglyphs macOS Artifact
uses: actions/upload-artifact@v4
with:
name: mglyphs_v0.2_macOS
path: ${{github.workspace}}/
103 changes: 29 additions & 74 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,48 @@
name: Release Build
name: mglyphs Release Build

on:
push:
branches: [main]
branches:
- main
pull_request:
branches: [main]
types: [closed]
branches:
- main
workflow_dispatch:

jobs:
release_linux:
name: linux cppandaction release
linux_build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Create Build Directory
- name: Checkout
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive --remote
- name: Build Directory
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
- name: Run CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build ./build --config Release

- name: Create Artifact
run: |
mkdir release
cp build/main release/main
- name: Publish Linux Artifact
uses: actions/upload-artifact@v2
- name: mglyphs Linux Artifact
uses: actions/upload-artifact@v4
with:
name: cppandaction linux release
path: release

# Build for macOs is working
release_macos:
name: macOS cppandaction release
runs-on: macos-11

name: mglyphs_v0.2_linux
path: ${{github.workspace}}/
macos_build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2

- name: Create Build Directory
- name: Checkout
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive --remote
- name: Build Directory
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
- name: Run CMake
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build ./build --config Release

- name: Create Artifact
run: |
mkdir release
cp build/main release/main
- name: Publish MacOS Artifact
uses: actions/upload-artifact@v2
- name: mglyphs macOS Artifact
uses: actions/upload-artifact@v4
with:
name: cppandaction macOS release
path: release

# Artifac creation not working
# release_windows:
# name: windows cppandaction release
# runs-on: windows-latest

# steps:
# - uses: actions/checkout@v2

# - name: Create Build Directory
# run: cmake -E make_directory ${{github.workspace}}/build

# - name: Configure CMake
# run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

# - name: Build
# run: cmake --build ./build --config Release

# - name: Create Artifact
# run: |
# mkdir release
# copy build/main.exe release/main.exe

# - name: Publish Windows Artifact
# uses: actions/upload-artifact@v2
# with:
# name: cppandaction windows release
# path: release
# Artifac creation not working --
name: mglyphs_v0.2_macOS
path: ${{github.workspace}}/

0 comments on commit 61bcd1d

Please sign in to comment.