Skip to content

Commit

Permalink
update to latest sdk and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Ramirez committed Aug 12, 2021
1 parent a00d125 commit 988e37f
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 29 deletions.
53 changes: 36 additions & 17 deletions .github/workflows/main.yml
@@ -1,26 +1,33 @@
name: CI
name: Release

on: [push, pull_request]
on:
create:
tags:
- v*
workflow_dispatch:

jobs:
package:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]
config: [debug, release]
config: [release]

steps:
- uses: actions/checkout@v2

- uses: benjlevesque/short-sha@v1.1
with:
submodules: 'recursive'
fetch-depth: '0'

- uses: benjlevesque/short-sha@v1.2
id: short-sha
with:
length: 7

- name: configure_macos
if: matrix.os == 'macos-latest'
run: mkdir build && cd build && cmake -G Xcode ..
run: mkdir build && cd build && cmake -G Xcode .. "-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"

- name: configure_windows
if: matrix.os == 'windows-latest'
Expand Down Expand Up @@ -49,9 +56,12 @@ jobs:
PACKAGE_CONFIG=`echo $GITHUB_CONFIG`
mkdir -p $PACKAGE_NAME
if [ -e package-info.json ]; then cp package-info.json $PACKAGE_NAME; fi
for f in *.md; do [ -e "$f" ] && cp "$f" $PACKAGE_NAME ; done
# if [ -e package-info.json.in ]; then cp package-info.json.in $PACKAGE_NAME; fi
# for f in *.md; do [ -e "$f" ] && cp "$f" $PACKAGE_NAME ; done
if [ -e License.md ]; then cp License.md $PACKAGE_NAME; fi
if [ -e ReadMe.md ]; then cp ReadMe.md $PACKAGE_NAME; fi
if [ -e icon.png ]; then cp icon.png $PACKAGE_NAME; fi
if [ -e CMakeLists.txt ]; then cp CMakeLists.txt $PACKAGE_NAME; fi
# if [ -e CMakeLists.txt ]; then cp CMakeLists.txt $PACKAGE_NAME; fi
if [ -d code ]; then cp -r code $PACKAGE_NAME; fi
if [ -d docs ]; then cp -r docs $PACKAGE_NAME; fi
if [ -d examples ]; then cp -r examples $PACKAGE_NAME; fi
Expand All @@ -60,16 +70,18 @@ jobs:
if [ -d extras ]; then cp -r extras $PACKAGE_NAME; fi
if [ -d help ]; then cp -r help $PACKAGE_NAME; fi
if [ -d init ]; then cp -r init $PACKAGE_NAME; fi
if [ -d interfaces ]; then cp -r interfaces $PACKAGE_NAME; fi
if [ -d java-classes ]; then cp -r java-classes $PACKAGE_NAME; fi
if [ -d java-doc ]; then cp -r java-doc $PACKAGE_NAME; fi
if [ -d javascript ]; then cp -r javascript $PACKAGE_NAME; fi
if [ -d jsui ]; then cp -r jsui $PACKAGE_NAME; fi
if [ -d media ]; then cp -r media $PACKAGE_NAME; fi
if [ -d misc ]; then cp -r misc $PACKAGE_NAME; fi
if [ -d patchers ]; then cp -r patchers $PACKAGE_NAME; fi
if [ -d script ]; then cp -r script $PACKAGE_NAME; fi
if [ -d support ]; then cp -r support $PACKAGE_NAME; fi
if [ -d source ]; then cp -r source $PACKAGE_NAME; fi
if [ -d tests ]; then cp -r tests $PACKAGE_NAME; fi
# if [ -d source ]; then cp -r source $PACKAGE_NAME; fi
# if [ -d tests ]; then cp -r tests $PACKAGE_NAME; fi
if [ -e $PACKAGE_NAME/ReadMe-Public.md ]; then rm -f $PACKAGE_NAME/ReadMe.md; mv $PACKAGE_NAME/ReadMe-Public.md $PACKAGE_NAME/ReadMe.md; fi
- name: package_windows
Expand All @@ -94,10 +106,17 @@ jobs:
release:
runs-on: ubuntu-latest
needs: package
if: ${{ contains( github.ref, 'refs/tags/' ) }}

steps:
- uses: benjlevesque/short-sha@v1.1
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: '0'

- uses: battila7/get-version-action@v2
id: get_version

- uses: benjlevesque/short-sha@v1.2
id: short-sha
with:
length: 7
Expand All @@ -112,15 +131,15 @@ jobs:
working-directory: ${{ github.event.repository.name }}

- name: zip
run: zip -r ${{ github.event.repository.name }}-package-for-max-${{ steps.short-sha.outputs.sha }}.zip ${{ github.event.repository.name }}
run: zip -r ${{ github.event.repository.name }}-package-for-max-${{ steps.get_version.outputs.version }}.zip ${{ github.event.repository.name }}

- uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}-${{ steps.short-sha.outputs.sha }}-zipped-release
path: ${{ github.event.repository.name }}-package-for-max-${{ steps.short-sha.outputs.sha }}.zip
name: ${{ github.event.repository.name }}-${{ steps.get_version.outputs.version }}-zipped-release
path: ${{ github.event.repository.name }}-package-for-max-${{ steps.get_version.outputs.version }}.zip

- uses: ncipollo/release-action@v1.7.1
- uses: ncipollo/release-action@v1
with:
artifacts: ${{ github.event.repository.name }}-package-for-max-${{ steps.short-sha.outputs.sha }}.zip
artifacts: ${{ github.event.repository.name }}-package-for-max-${{ steps.get_version.outputs.version }}.zip
body: "Max Package for all supported platforms"
token: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,46 @@
name: Test

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
workflow_dispatch:

jobs:
test:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: '0'

- name: Configure macOS
if: matrix.os == 'macos-latest'
run: mkdir build && cd build && cmake -G Xcode ..

- name: Configure Windows
if: matrix.os == 'windows-latest'
run: mkdir build && cd build && cmake ..

- name: Build Debug
run: cmake --build build --config 'Debug'

- name: Test Debug
run: cd build && ctest -C 'Debug' . -V

- name: Build Release
run: cmake --build build --config 'Release'

- name: Test Release
run: cd build && ctest -C 'Release' . -V
12 changes: 2 additions & 10 deletions CMakeLists.txt
@@ -1,23 +1,15 @@
cmake_minimum_required(VERSION 3.16)

if (APPLE)
set (CMAKE_OSX_DEPLOYMENT_TARGET "10.11")
endif ()


project(Min-DevKit)

cmake_minimum_required(VERSION 3.19)

string(REGEX REPLACE "(.*)/" "" THIS_PACKAGE_NAME "${CMAKE_CURRENT_SOURCE_DIR}")


if (${CMAKE_GENERATOR} MATCHES "Xcode")
if (${XCODE_VERSION} VERSION_LESS 10)
message(STATUS "Xcode 10 or higher is required. Please install from the Mac App Store.")
return ()
endif ()
endif ()

set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")

# Fetch the correct version of the min-api
message(STATUS "Updating Git Submodules")
Expand Down
2 changes: 1 addition & 1 deletion source/min-api
Submodule min-api updated 47 files
+45 −0 .github/workflows/test.yml
+3 −3 .gitmodules
+18 −24 CMakeLists.txt
+4 −1 ReadMe.md
+3 −3 doc/GuideToWritingObjects.md
+16 −12 include/c74_min_api.h
+20 −22 include/c74_min_atom.h
+29 −39 include/c74_min_attribute.h
+28 −7 include/c74_min_attribute_impl.h
+84 −32 include/c74_min_buffer.h
+5 −5 include/c74_min_dictionary.h
+3 −0 include/c74_min_doc.h
+12 −0 include/c74_min_graphics.h
+5 −8 include/c74_min_impl.h
+5 −5 include/c74_min_limit.h
+8 −3 include/c74_min_message.h
+2 −2 include/c74_min_object_components.h
+31 −22 include/c74_min_object_wrapper.h
+11 −10 include/c74_min_operator_ui.h
+11 −6 include/c74_min_operator_vector.h
+3 −3 include/c74_min_outlet.h
+5 −5 include/c74_min_patcher.h
+7 −7 include/c74_min_path.h
+8 −1 include/c74_min_symbol.h
+1 −1 include/c74_min_threadsafety.h
+1 −1 include/c74_min_time.h
+91 −33 include/c74_min_timer.h
+1 −1 include/readerwriterqueue
+0 −1 max-api
+1 −0 max-sdk-base
+1 −1 script/min-package.cmake
+7 −7 script/min-posttarget.cmake
+3 −3 script/min-pretarget.cmake
+56 −0 test/CMakeLists.txt
+2 −4 test/atom.cpp
+0 −11 test/atom/CMakeLists.txt
+6,295 −2,720 test/catch.hpp
+5 −3 test/limit.cpp
+0 −11 test/limit/CMakeLists.txt
+39 −0 test/main.cpp
+0 −55 test/min-api-unittest.cmake
+9 −9 test/min-object-unittest.cmake
+1 −1 test/mock
+2 −3 test/object.cpp
+0 −11 test/object/CMakeLists.txt
+2 −3 test/symbol.cpp
+0 −11 test/symbol/CMakeLists.txt
2 changes: 1 addition & 1 deletion source/min-lib

0 comments on commit 988e37f

Please sign in to comment.