-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (107 loc) · 3.73 KB
/
all.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Compile
on:
pull_request: {}
push:
tags:
- '*'
jobs:
build-windows:
runs-on: windows-latest
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
- name: Get CMake
uses: lukka/get-cmake@latest
- name: Build Windows (Release)
run: |
mkdir build
cmake . -DCMAKE_BUILD_TYPE=Release -Bbuild -DPython_ROOT_DIR=$pythonLocation
cd build
msbuild ChucKDesignerCHOP.sln /property:Configuration=Release
- name: Make distribution
run: |
mkdir chuckdesigner_dist
move ${{ github.workspace }}/Plugins/ChucK*.dll chuckdesigner_dist
7z a ChucKDesigner-${{ matrix.os }}.zip ./chuckdesigner_dist/* -r
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: my-artifact-${{ matrix.os }}
path: ChucKDesigner-${{ matrix.os }}.zip
build-macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Setup Python 3.11
run: |
which python
python --version
pip install --upgrade certifi
cd install_script
python macos_install_python.py
- name: Get CMake
uses: lukka/get-cmake@latest
- name: Some Setup
run: |
cd thirdparty/chuck/src/core
bison -dv -b chuck chuck.y
flex -ochuck.yy.c chuck.lex
- name: Build MacOS (Release)
run: |
export PATH=/Library/Frameworks/Python.framework/Versions/3.11:/Library/Frameworks/Python.framework/Versions/3.11/bin:/Library/Frameworks/Python.framework/Versions/3.11/lib:$PATH
which python3
python3 --version
which python3
python3 --version
mkdir build && cd build
cmake .. -G "Xcode" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
xcodebuild -configuration Release -project ChucKDesignerCHOP.xcodeproj
ls -r *
install_name_tool -change @rpath/libChucKDesignerShared.dylib @loader_path/../../../libChucKDesignerShared.dylib Release/ChucKDesignerCHOP.plugin/Contents/MacOS/ChucKDesignerCHOP
install_name_tool -change @rpath/libChucKDesignerShared.dylib @loader_path/../../../libChucKDesignerShared.dylib Release/ChucKListenerCHOP.plugin/Contents/MacOS/ChucKListenerCHOP
- name: Make distribution
run: |
mkdir chuckdesigner_dist
cp ${{ github.workspace }}/build/Release/libChucKDesignerShared.dylib chuckdesigner_dist
mv ${{ github.workspace }}/build/Release/ChucKDesignerCHOP.plugin chuckdesigner_dist
mv ${{ github.workspace }}/build/Release/ChucKListenerCHOP.plugin chuckdesigner_dist
zip -r ChucKDesigner-${{ matrix.os }}.zip chuckdesigner_dist
# Don't upload until we figure out codesigning.
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: my-artifact-${{ matrix.os }}
# path: ChucKDesigner-${{ matrix.os }}.zip
create-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-windows, build-macos]
runs-on: ubuntu-latest
name: "Create Release on GitHub"
steps:
- uses: actions/download-artifact@v3
with:
path: "dist"
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true