Skip to content

ci: 最大200行を守るためのステップを追加 #400

ci: 最大200行を守るためのステップを追加

ci: 最大200行を守るためのステップを追加 #400

Workflow file for this run

name: Build on Ubuntu
on:
push:
branches: [ master ]
pull_request:
types:
- opened
- synchronize
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get remove --purge man-db
sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
clang \
libx11-dev \
libxcb1-dev \
libxkbcommon-dev \
libwayland-dev \
libxrandr-dev \
libltdl-dev \
patchelf
- name: install meson
run: pip install meson
- name: Cache vcpkg packages
id: cache-vcpkg
uses: actions/cache@v4
with:
path: |
vcpkg_installed
vcpkg/buildtrees
vcpkg/packages
vcpkg/vcpkg
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'triplets/**', '.gitmodules') }}
- name: Setup vcpkg
if: steps.cache-vcpkg.outputs.cache-hit != 'true'
run: |
./vcpkg/bootstrap-vcpkg.sh
./vcpkg/vcpkg install --overlay-triplets=./triplets --triplet=custom-x64-linux
- name: Build & install orge (static)
run: |
export CC=clang
export CXX=clang++
meson setup build-static \
-Dbuild_examples=true \
-Dbuildtype=release \
--prefix=$(pwd)/installed-static \
--cmake-prefix-path=$(pwd)/vcpkg_installed/custom-x64-linux \
--default-library=static
meson install -C build-static
tree installed-static
- name: Build & install orge (shared)
run: |
export CC=clang
export CXX=clang++
meson setup build-shared \
-Dbuild_examples=true \
-Dbuildtype=release \
--prefix=$(pwd)/installed-shared \
--cmake-prefix-path=$(pwd)/vcpkg_installed/custom-x64-linux \
--default-library=shared
meson install -C build-shared
tree installed-shared
- name: Upload orge artifacts
uses: actions/upload-artifact@v4
with:
name: orge-lib
path: |
./installed-static
./installed-shared
./examples/simple/main.cpp
- name: Prepare uploading orge artifacts (for release)
if: startsWith(github.head_ref, 'release')
run: |
cp -r licenses installed-static
cp -r licenses installed-shared
- name: Upload orge artifacts (for release) (static)
if: startsWith(github.head_ref, 'release')
uses: actions/upload-artifact@v4
with:
name: orge-x64-linux-static
path: installed-static
- name: Upload orge artifacts (for release) (shared)
if: startsWith(github.head_ref, 'release')
uses: actions/upload-artifact@v4
with:
name: orge-x64-linux-shared
path: installed-shared
test-standalone:
runs-on: ubuntu-latest
needs: build
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get remove --purge man-db
sudo apt-get install -y --no-install-recommends libvulkan1
- name: Download orge artifacts
uses: actions/download-artifact@v4
with:
name: orge-lib
path: ./orge
- name: Test build with static
run: |
export PKG_CONFIG_PATH=$(pwd)/orge/installed-static/lib/pkgconfig
mkdir ./static
cd ./static
g++ ../orge/examples/simple/main.cpp $(pkg-config orge --cflags --libs --static) /lib/x86_64-linux-gnu/libvulkan.so.1
- name: Test build with shared
run: |
export PKG_CONFIG_PATH=$(pwd)/orge/installed-shared/lib/pkgconfig
mkdir ./shared
cd ./shared
g++ ../orge/examples/simple/main.cpp $(pkg-config orge --cflags --libs)