Skip to content

use gcc in ubuntu

use gcc in ubuntu #63

Workflow file for this run

name: Build Binaries
on:
- push
- pull_request
- workflow_dispatch
defaults:
run:
shell: bash
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup-cpp
with:
toolchain: GCC
- name: Setup JS
uses: ./.github/actions/setup-js
- name: Restore emsdk
uses: ./.github/actions/cache-emsdk
- name: Build
run: |
cmake -B build -S yoga -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -G Ninja
cmake --build build --config Release
mkdir -p dist/linux
cp build/libyogacore.so dist/linux/libyoga.so
- name: Build JS
working-directory: javascript
run: |
yarn build
mkdir -p ../dist/webgl
cp build/libyogaObjLib.a ../dist/webgl/libyoga.a
- name: Upload Binaries
uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
path: dist/**
name: prebuilt_yoga_binaries
build-macos:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup-cpp
with:
toolchain: CLang
- name: Setup Apple
uses: ./.github/actions/setup-apple
- name: Build
run: |
cmake -B build -S yoga -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build --config Release
mkdir -p dist/osx
cp build/libyogacore.dylib dist/osx/libyoga.dylib
- name: Build IOS
run: |
rm -rf build
cmake -B build -S yoga -D CMAKE_BUILD_TYPE=Release -G Xcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_Swift_COMPILER_FORCED=true -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0
cmake --build build --config Release
mkdir -p dist/iOS
cp build/Release-iphoneos/libyogacore.a dist/iOS/libyoga.a
- name: Upload Binaries
uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
path: dist/**
name: prebuilt_yoga_binaries
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup-cpp
with:
toolchain: MSVC
- name: Build
run: |
cmake -B build -S yoga -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON
cmake -B build32 -S yoga -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -A Win32
cmake --build build --config Release
cmake --build build32 --config Release
mkdir -p dist/win-x64 dist/win-x86
cp build/Release/yogacore.dll dist/win-x64/yoga.dll
cp build32/Release/yogacore.dll dist/win-x86/yoga.dll
- name: Upload Binaries
uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
path: dist/**
name: prebuilt_yoga_binaries
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-android
- name: Build
run: |
./gradlew :yoga:assembleRelease
mkdir -p dist/android
cp java/build/outputs/aar/yoga-release.aar dist/android/yoga.aar
- name: Upload Binaries
uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
path: dist/**
name: prebuilt_yoga_binaries