Skip to content

Build Libs

Build Libs #90

Workflow file for this run

name: Build Libs
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- 'Platform/**'
- '!Platform/libs/**'
pull_request:
paths:
- 'Platform/**'
- '!Platform/libs/**'
jobs:
Build:
strategy:
matrix:
include:
- os: windows-latest
arch: x64
target: win-x64
ext: .dll
- os: macos-latest
arch: x64-arm64
target: osx
ext: .dylib
- os: ubuntu-latest
arch: x64
target: linux-x64
ext: .so
runs-on: ${{matrix.os}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get CMake
uses: lukka/get-cmake@v3.29.4
- name: Setup Linux dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install build-essential git make \
pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev \
libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
- name: CMake Configure
run: cmake -B build -S Platform -DFOSTER_OVERRIDE_TARGET=${{matrix.target}} -D CMAKE_SYSTEM_VERSION=10.0.26100.0
- name: CMake Build
run: cmake --build build --config Release
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}-${{matrix.arch}}-build
path: Platform/libs/${{matrix.target}}/*${{matrix.ext}}*
UpdateLibs:
if: github.ref == 'refs/heads/main'
needs: [Build]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download windows x64 libs
uses: actions/download-artifact@v4
with:
name: windows-latest-x64-build
path: Platform/libs/win-x64
- name: Download macos libs
uses: actions/download-artifact@v4
with:
name: macos-latest-x64-arm64-build
path: Platform/libs/osx
- name: Download ubuntu libs
uses: actions/download-artifact@v4
with:
name: ubuntu-latest-x64-build
path: Platform/libs/linux-x64
- name: Display structure of libs
run: ls -R
working-directory: Platform/libs
- name: Commit changes
uses: EndBug/add-and-commit@v9.1.3
with:
message: Updated platform libs
committer_name: GitHub Actions
committer_email: actions@github.com