-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from adminfriso/main
Add github actions CI to test if it builds
- Loading branch information
Showing
6 changed files
with
371 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: build-vs | ||
|
||
# make the action not run on the local repo if the branch is also in a pull request to OF/OF | ||
on: [push] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-vs2022: | ||
runs-on: windows-2022 | ||
strategy: | ||
matrix: | ||
# platform: [x64, ARM64, ARM64EC] | ||
platform: [x64] | ||
|
||
env: | ||
BITS: ${{ matrix.bits }} | ||
steps: | ||
- name: checkout openframeworks | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: openframeworks/openFrameworks | ||
# now we add in ofxLaser as addon | ||
- name: checkout ofxLaser | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.workspace }}/addons/ofxLaser | ||
# and here we replace the empty example with the hello laser example | ||
- name: remove emptyExample | ||
run: rm -r ${{ github.workspace }}/examples/templates/emptyExample | ||
- name: replace emptyExample with example_HelloLaser | ||
run: cp -r ${{ github.workspace }}/addons/ofxLaser/example_HelloLaser ${{ github.workspace }}/examples/templates/emptyExample | ||
|
||
# continue openframeworks defined pipeline | ||
- uses: msys2/[email protected] | ||
with: | ||
update: true | ||
install: >- | ||
git | ||
unzip | ||
rsync | ||
wget | ||
- name: Install dependencies | ||
shell: msys2 {0} | ||
run: | ||
./scripts/ci/vs/install_bleeding.sh | ||
- name: Setup MSBuild | ||
uses: microsoft/setup-msbuild@v2 | ||
# - name: Build emptyExample | ||
# working-directory: ${{env.GITHUB_WORKSPACE}} | ||
# run: | ||
# msbuild examples/templates/emptyExample/emptyExample.vcxproj /p:configuration=release /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143 | ||
# - name: Build allAddonsExample | ||
# working-directory: ${{env.GITHUB_WORKSPACE}} | ||
# run: | ||
# msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:configuration=release /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143 | ||
- name: Build DEBUG emptyExample | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: | ||
msbuild examples/templates/emptyExample/emptyExample.vcxproj /p:configuration=debug /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143 | ||
# - name: Build DEBUG allAddonsExample | ||
# working-directory: ${{env.GITHUB_WORKSPACE}} | ||
# run: | ||
# msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:configuration=debug /p:platform=${{ matrix.platform }} /p:PlatformToolset=v143 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: build-emscripten | ||
|
||
# make the action not run on the local repo if the branch is also in a pull request to OF/OF | ||
on: [push] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-emscripten: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
cfg: | ||
- {target: emscripten} | ||
env: | ||
TARGET: ${{matrix.cfg.target}} | ||
steps: | ||
- name: checkout openframeworks | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: openframeworks/openFrameworks | ||
# now we add in ofxLaser as addon | ||
- name: checkout ofxLaser | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.workspace }}/addons/ofxLaser | ||
# and here we replace the empty example with the hello laser example | ||
- name: remove emptyExample | ||
run: rm -r ${{ github.workspace }}/examples/templates/emptyExample | ||
- name: replace emptyExample with example_HelloLaser | ||
run: cp -r ${{ github.workspace }}/addons/ofxLaser/example_HelloLaser ${{ github.workspace }}/examples/templates/emptyExample | ||
|
||
# continue openframeworks defined pipeline | ||
|
||
- name: Docker Step | ||
run: "docker run -di --name emscripten -v $PWD:/src emscripten/emsdk:3.1.21 bash" | ||
- name: Download libs | ||
run: ./scripts/$TARGET/download_libs.sh | ||
- name: Install dependencies | ||
run: ./scripts/ci/$TARGET/install.sh | ||
- name: Build | ||
run: docker exec -i emscripten sh -c "scripts/ci/$TARGET/build.sh"; | ||
- name: Upload Libs | ||
run: scripts/ci/upload_of_lib.sh; | ||
env: | ||
GA_CI_SECRET: ${{ secrets.CI_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: build-ios-tvos | ||
|
||
# make the action not run on the local repo if the branch is also in a pull request to OF/OF | ||
on: [push] | ||
|
||
env: | ||
ccache: ccache | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-ios-tvos: | ||
runs-on: macos-13 | ||
strategy: | ||
matrix: | ||
cfg: | ||
- {target: ios, libs: ios} | ||
#- {target: tvos, libs: ios} #broken currently maybe better to just remove | ||
env: | ||
TARGET: ${{matrix.cfg.target}} | ||
steps: | ||
- name: checkout openframeworks | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: openframeworks/openFrameworks | ||
# now we add in ofxLaser as addon | ||
- name: checkout ofxLaser | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.workspace }}/addons/ofxLaser | ||
# and here we replace the empty example with the hello laser example | ||
- name: remove emptyExample | ||
run: rm -r ${{ github.workspace }}/examples/templates/emptyExample | ||
- name: replace emptyExample with example_HelloLaser | ||
run: cp -r ${{ github.workspace }}/addons/ofxLaser/example_HelloLaser ${{ github.workspace }}/examples/templates/emptyExample | ||
|
||
# continue openframeworks defined pipeline | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }} | ||
|
||
- name: Download libs | ||
run: ./scripts/${{matrix.cfg.libs}}/download_libs.sh | ||
- name: install | ||
run: ./scripts/ci/$TARGET/install.sh | ||
- name: Build | ||
run: ./scripts/ci/$TARGET/build.sh; | ||
|
||
env: | ||
DEVELOPER_DIR: "/Applications/Xcode_15.2.app/Contents/Developer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: build-linux64 | ||
|
||
# make the action not run on the local repo if the branch is also in a pull request to OF/OF | ||
on: [push] | ||
|
||
env: | ||
ccache: ccache | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-linux64-platforms: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
cfg: | ||
- {target: linux64, libs: 64gcc6} | ||
env: | ||
TARGET: ${{matrix.cfg.target}} | ||
steps: | ||
- name: Remove Old lib-unwind | ||
run: if [ "$TARGET" = "linux64" ]; then | ||
sudo apt-get remove libunwind-14 -y; | ||
fi | ||
- name: Cache Packages | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: make curl libunwind-dev libjack-jackd2-0 libjack-jackd2-dev freeglut3-dev libasound2-dev libxmu-dev libxxf86vm-dev g++ libgl1-mesa-dev libglu1-mesa-dev libraw1394-dev libudev-dev libdrm-dev libglew-dev libopenal-dev libsndfile1-dev libfreeimage-dev libcairo2-dev libfreetype6-dev libssl-dev libpulse-dev libusb-1.0-0-dev libgtk2.0-dev libopencv-dev libassimp-dev librtaudio-dev gdb libglfw3-dev liburiparser-dev libcurl4-openssl-dev libpugixml-dev libgconf-2-4 libgtk2.0-0 libpoco-dev libxcursor-dev libxi-dev libxinerama-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-pulseaudio gstreamer1.0-x gstreamer1.0-plugins-bad gstreamer1.0-alsa gstreamer1.0-plugins-base gstreamer1.0-plugins-good | ||
version: 1.0 | ||
|
||
- name: checkout openframeworks | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: openframeworks/openFrameworks | ||
# now we add in ofxLaser as addon | ||
- name: checkout ofxLaser | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.workspace }}/addons/ofxLaser | ||
# and here we replace the empty example with the hello laser example | ||
- name: remove emptyExample | ||
run: rm -r ${{ github.workspace }}/examples/templates/emptyExample | ||
- name: replace emptyExample with example_HelloLaser | ||
run: cp -r ${{ github.workspace }}/addons/ofxLaser/example_HelloLaser ${{ github.workspace }}/examples/templates/emptyExample | ||
|
||
# continue openframeworks defined pipeline | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: ${{ matrix.cfg.target }}-${{ matrix.cfg.libs }} | ||
|
||
- name: Download libs | ||
run: ./scripts/linux/download_libs.sh -a ${{matrix.cfg.libs}}; | ||
- name: Install dependencies | ||
run: ./scripts/ci/$TARGET/install.sh; | ||
- name: Build | ||
run: if [ "$TARGET" = "linux64" ]; then | ||
scripts/ci/linux64/build.sh; | ||
scripts/ci/$TARGET/run_tests.sh; | ||
else | ||
scripts/ci/$TARGET/build.sh; | ||
fi | ||
# - name: Upload Libs | ||
# run: scripts/ci/upload_of_lib.sh; | ||
# env: | ||
# GA_CI_SECRET: ${{ secrets.CI_SECRET }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: build-macos | ||
|
||
# make the action not run on the local repo if the branch is also in a pull request to OF/OF | ||
on: [push] | ||
|
||
env: | ||
ccache: ccache | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-macos: | ||
runs-on: macos-13 | ||
strategy: | ||
matrix: | ||
cfg: | ||
- {target: osx, opt: "xcode"} | ||
# - {target: osx, opt: "makefiles"} | ||
steps: | ||
- name: checkout openframeworks | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: openframeworks/openFrameworks | ||
# now we add in ofxLaser as addon | ||
- name: checkout ofxLaser | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.workspace }}/addons/ofxLaser | ||
# and here we replace the empty example with the hello laser example | ||
- name: remove emptyExample | ||
run: rm -r ${{ github.workspace }}/examples/templates/emptyExample | ||
- name: replace emptyExample with example_HelloLaser | ||
run: cp -r ${{ github.workspace }}/addons/ofxLaser/example_HelloLaser ${{ github.workspace }}/examples/templates/emptyExample | ||
|
||
# continue openframeworks defined pipeline | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
# key: ${{ matrix.os }}-${{ matrix.type }} | ||
key: ${{ matrix.cfg.target }}-${{ matrix.cfg.opt }} | ||
# key: ${{ matrix.msystem }} | ||
|
||
|
||
- name: Download libs | ||
# continue-on-error: true | ||
run: ./scripts/${{ matrix.cfg.target }}/download_libs.sh | ||
# - name: rm-dev | ||
# run: sudo rm -rf /Library/Developer | ||
|
||
# this step is not needed here because the script is empty | ||
# - name: install | ||
# run: ./scripts/ci/$TARGET/install.sh | ||
|
||
- name: Build | ||
run: | ||
if [ ${{ matrix.cfg.opt }} = "xcode" ]; then | ||
scripts/ci/${{ matrix.cfg.target }}/build.sh ${{ matrix.cfg.opt }}; | ||
else | ||
scripts/ci/${{ matrix.cfg.target }}/run_tests.sh; | ||
fi | ||
env: | ||
DEVELOPER_DIR: "/Applications/Xcode.app/Contents/Developer" | ||
SDKROOT: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: build-msys2 | ||
|
||
# make the action not run on the local repo if the branch is also in a pull request to OF/OF | ||
on: [push] | ||
|
||
env: | ||
ccache: ccache | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-msys2: | ||
runs-on: windows-latest | ||
strategy: | ||
matrix: | ||
msystem: | ||
- mingw64 | ||
# - ucrt64 | ||
# defaults: | ||
# run: | ||
# shell: msys2 {0} | ||
steps: | ||
- name: checkout openframeworks | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: openframeworks/openFrameworks | ||
# now we add in ofxLaser as addon | ||
- name: checkout ofxLaser | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ${{ github.workspace }}/addons/ofxLaser | ||
# and here we replace the empty example with the hello laser example | ||
- name: remove emptyExample | ||
run: rm -r ${{ github.workspace }}/examples/templates/emptyExample | ||
- name: replace emptyExample with example_HelloLaser | ||
run: cp -r ${{ github.workspace }}/addons/ofxLaser/example_HelloLaser ${{ github.workspace }}/examples/templates/emptyExample | ||
|
||
# continue openframeworks defined pipeline | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
# key: ${{ matrix.os }}-${{ matrix.type }} | ||
key: ${{ matrix.msystem }} | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
cache: true | ||
update: false | ||
msystem: ${{matrix.msystem}} | ||
pacboy: assimp:p cairo:p curl:p freeglut:p FreeImage:p gcc:p gdb:p glew:p glfw:p glm:p harfbuzz:p libsndfile:p libusb:p libxml2:p mpg123:p nlohmann-json:p ntldd-git:p openal:p opencv:p pkgconf:p pugixml:p rtaudio:p uriparser:p utf8cpp:p zlib:p poco:p | ||
# boost:p tools:p | ||
# install: >- | ||
# unzip | ||
# git | ||
# rsync | ||
# wget | ||
|
||
- name: Install dependencies | ||
run: msys2 ./scripts/ci/msys2/install.sh | ||
|
||
- name: Build | ||
run: msys2 ./scripts/ci/msys2/build.sh | ||
|
||
# - name: Run tests | ||
# run: msys2 ./scripts/ci/msys2/run_tests.sh | ||
|