Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Actions Test #431

Open
wants to merge 9 commits into
base: bleeding
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
163 changes: 0 additions & 163 deletions .github/disabled/build-linux-arm.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
135 changes: 135 additions & 0 deletions .github/disabled/deployment-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: build-xcframeworks
on:
push:
branches:
- master
- bleeding
paths-ignore:
- '**/README.md'
pull_request:
branches:
- master
- bleeding
paths-ignore:
- '**/README.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
wait-for-workflows:
runs-on: [ubuntu-latest]
if: github.repository == 'openframeworks/apothecary' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
steps:
- name: Wait build-ios
uses: NathanFirmo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: 'build-ios.yml'
- name: Wait build-macos
uses: NathanFirmo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: 'build-macos.yml'
# - name: Wait build-xros
# uses: NathanFirmo/[email protected]
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# workflow: 'build-xros.yml'
# - name: Wait build-catos
# uses: NathanFirmo/[email protected]
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# workflow: 'build-catos.yml'
- name: Wait build-tvos
uses: NathanFirmo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: 'build-tvos.yml'
# - name: Wait build-watchos
# uses: NathanFirmo/[email protected]
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# workflow: 'build-watchos.yml'
build-xcframework:
runs-on: macos-14
if: github.repository == 'openframeworks/apothecary' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
needs: wait-for-workflows
env:
DEVELOPER_DIR: "/Applications/Xcode_15.4.app/Contents/Developer"
TARGET: "macos"
steps:
- name: Determine Release
id: vars
shell: bash
run: |
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
echo "RELEASE=nightly" >> $GITHUB_ENV
echo "PRERELEASE=false" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then
echo "RELEASE=bleeding" >> $GITHUB_ENV
echo "PRERELEASE=true" >> $GITHUB_ENV
else
echo "RELEASE=bleeding" >> $GITHUB_ENV
echo "PRERELEASE=true" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
jobs:

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
platform: linux
- os: macos-latest
platform: osx
- os: windows-latest
platform: vs

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Download OpenFrameworks Source
run: |
git clone --depth=1 https://github.com/openframeworks/openFrameworks.git openFrameworks
cd openFrameworks

- name: Copy Apothecary Libraries
run: |
# Adjust paths based on where Apothecary output is located
if [[ -d "/out" ]]; then
cp -r /out/* openFrameworks/libs/
elif [[ -d "/xout" ]]; then
cp -r /xout/* openFrameworks/libs/
else
echo "No Apothecary output found in /out or /xout"
fi

- name: Run ProjectGenerator
run: |
cd openFrameworks
./projectGenerator --recursive ../example*

- name: Build Examples
run: |
cd openFrameworks
if [[ "${{ matrix.platform }}" == "linux" || "${{ matrix.platform }}" == "osx" ]]; then
for example in ../example*; do
make -C $example
done
else
powershell -command "ForEach ($example in Get-ChildItem -Path ..\\example*) { msbuild $example\\$example.sln }"
fi

- name: Upload Artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: build-logs
path: |
**/build/**/*.log
69 changes: 69 additions & 0 deletions .github/workflows/build-linux-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: build-linux-arm

on:
push:
paths-ignore:
- '**/README.md'
pull_request:
paths-ignore:
- '**/README.md'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
GA_CI_SECRET: ${{ secrets.CI_SECRET }}
USE_ARTIFACT: true

jobs:
build-linux-arm:
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- {target: linuxarmv6l, toolchain_prefix: arm-linux-gnueabihf}
- {target: linuxarmv7l, toolchain_prefix: arm-linux-gnueabihf}
- {target: linuxaarch64, toolchain_prefix: aarch64-linux-gnu}

env:
TARGET: ${{ matrix.cfg.target }}
TOOLCHAIN_PREFIX: ${{ matrix.cfg.toolchain_prefix }}

steps:
- uses: actions/[email protected]
- name: Setup Environment
run: |
echo "SYSROOT=/home/runner/work/apothecary/apothecary/scripts/${{ matrix.cfg.target }}/raspbian" >> $GITHUB_ENV
echo "TOOLCHAIN_ROOT=/home/runner/work/apothecary/apothecary/scripts/${{ matrix.cfg.target }}/rpi_toolchain" >> $GITHUB_ENV

- name: Scripts Calc Formula - ${{ matrix.cfg.target }}
run: ./scripts/calculate_formulas.sh

- name: Scripts Install
run: ./scripts/${{ matrix.cfg.target }}/install.sh

- name: Build - ${{ matrix.cfg.target }}
run: ./scripts/build.sh

- name: Package
run: scripts/package.sh

- name: Upload binaries as Artifact
if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding')
uses: actions/upload-artifact@v4
env:
release: ${{ env.RELEASE }}
with:
name: libs-${{ env.TARGET }}-${{ env.ARCH }}-${{ matrix.bundle }}
path: out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ matrix.bundle }}.zip
retention-days: 31
- name: Update Release arm64
if: (github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding'))
uses: johnwbyrd/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.RELEASE }}
release: ${{ env.RELEASE }}
prerelease: ${{ env.PRERELEASE }}
files: out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ matrix.bundle }}.zip
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
cfg:
- {target: linux64, opt: gcc6}
#- {target: linux64, opt: gcc8}
- {target: linux64, opt: gcc11}
env:
TARGET: ${{matrix.cfg.target}}
Expand Down
Loading
Loading