Skip to content

build-apps

build-apps #29

Workflow file for this run

name: 'build-apps'
on: workflow_dispatch
jobs:
build-binaries:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
# - platform: 'macos-latest'
# args: '--target x86_64-apple-darwin'
# - platform: 'ubuntu-22.04'
# args: ''
- platform: 'windows-latest'
args: ''
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
default: true
override: true
profile: minimal
toolchain: nightly
target: ${{ matrix.platform == 'macos-latest' && 'x86_64-apple-darwin' || '' }}
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: hes-game
- name: Install dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf libboost-all-dev
- name: Download Boost (Windows)
if: matrix.platform == 'windows-latest'
run: |
curl -L -o boost.zip https://boostorg.jfrog.io/artifactory/main/release/1.78.0/source/boost_1_78_0.zip
New-Item -ItemType Directory -Force -Path $Env:GITHUB_WORKSPACE\hector-rs\include\boost
tar -xf boost.zip --strip-components=1 -C $Env:GITHUB_WORKSPACE\hector-rs\include
echo "BOOST_ROOT=$Env:GITHUB_WORKSPACE\hector-rs\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "BOOST_INCLUDEDIR=$Env:GITHUB_WORKSPACE\hector-rs\include" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "BOOST_LIBRARYDIR=$Env:GITHUB_WORKSPACE\hector-rs\include\stage\lib" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Install Boost (Mac)
if: matrix.platform == 'macos-latest'
run: |
brew install [email protected]
echo "BOOST_ROOT=$(brew --prefix boost)" >> $GITHUB_ENV
echo "CXXFLAGS=-I$(brew --prefix boost)/include" >> $GITHUB_ENV
- name: Install cargo-leptos
uses: taiki-e/[email protected]
with:
tool: [email protected]
- name: Install wasm target
run: rustup target add wasm32-unknown-unknown
- name: Build Game
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: game-v__VERSION__
releaseName: 'Game v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
projectPath: hes-game
- name: Install trunk
uses: taiki-e/[email protected]
with:
tool: [email protected]
- name: Build Editor
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: editor-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
releaseName: 'Editor v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
projectPath: hes-editor