Skip to content

nix: only install the Unity stdio hooks in a Unity player #192

nix: only install the Unity stdio hooks in a Unity player

nix: only install the Unity stdio hooks in a Unity player #192

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build-windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: 3.1.1
- name: Build Release
run: |
xmake pack
- name: Build Debug
run: |
xmake f -m debug
xmake pack
- name: Upload Release
uses: actions/upload-artifact@v7
with:
path: build/xpack/doorstop/doorstop_windows_release.zip
archive: false
- name: Upload Debug
uses: actions/upload-artifact@v7
with:
path: build/xpack/doorstop/doorstop_windows_debug.zip
archive: false
build-linux:
runs-on: ubuntu-latest
container:
image: ubuntu:20.04
env:
XMAKE_ROOT: y
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install dependencies
run: apt-get update && apt-get install -y git build-essential libreadline-dev ccache gcc-multilib g++-multilib clang curl zip
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: 3.1.1
- name: Build Release
run: |
xmake pack
- name: Build Debug
run: |
xmake f -m debug
xmake pack
- name: Upload Release
uses: actions/upload-artifact@v7
with:
path: build/xpack/doorstop/doorstop_linux_release.zip
archive: false
- name: Upload Debug
uses: actions/upload-artifact@v7
with:
path: build/xpack/doorstop/doorstop_linux_debug.zip
archive: false
build-macos:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: 3.1.1
- name: Build Release
run: |
xmake pack
- name: Build Debug
run: |
xmake f -m debug
xmake pack
- name: Upload Release
uses: actions/upload-artifact@v7
with:
path: build/xpack/doorstop/doorstop_macosx_release.zip
archive: false
- name: Upload Debug
uses: actions/upload-artifact@v7
with:
path: build/xpack/doorstop/doorstop_macosx_debug.zip
archive: false
collect:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs:
- build-windows
- build-linux
- build-macos
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Grab version
run: |
for k in artifacts/*.zip; do mv "${k}" "${k%.zip}"; done
for k in artifacts/doorstop_windows_*; do mv "${k}" "artifacts/doorstop_win_${k##*_}"; done
for k in artifacts/doorstop_macosx_*; do mv "${k}" "artifacts/doorstop_macos_${k##*_}"; done
VERSION=$(cat artifacts/doorstop_win_release/x86/.doorstop_version)
echo "doorstop_version=$VERSION" >> $GITHUB_ENV
- name: Create zips
run: |
mkdir dist
cd artifacts
zip -r ../dist/doorstop_all_${{ env.doorstop_version }}.zip *
for dir in *
do
(cd ${dir}; zip -r ../../dist/${dir}_${{ env.doorstop_version }}.zip *)
done
- name: Create release
# TODO: find a replacement for this action
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "ci"
prerelease: true
title: "CI build"
files: dist/*.zip