Skip to content

build-apps

build-apps #19

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: Rust cache
uses: Swatinem/rust-cache@v2
with:
workspaces: hes-game
- name: install cargo-leptos
run: cargo install cargo-leptos
- name: install trunk
run: cargo install trunk
- name: install wasm target
run: rustup target add wasm32-unknown-unknown
- name: install dependencies (ubuntu only)
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
if: matrix.platform == 'windows-latest'
run: |
curl -L -o boost.zip https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.zip
Expand-Archive -Path boost.zip -DestinationPath $Env:USERPROFILE\boost
echo "BOOST_ROOT=$Env:USERPROFILE\boost\boost_1_76_0" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "BOOST_INCLUDEDIR=$Env:USERPROFILE\boost\boost_1_76_0" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
echo "BOOST_LIBRARYDIR=$Env:USERPROFILE\boost\boost_1_76_0\lib64-msvc-14.2" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Verify Boost Installation
if: matrix.platform == 'windows-latest'
run: |
echo BOOST_ROOT=$Env:BOOST_ROOT
echo BOOST_INCLUDEDIR=$Env:BOOST_INCLUDEDIR
echo BOOST_LIBRARYDIR=$Env:BOOST_LIBRARYDIR
if (Test-Path -Path $Env:BOOST_INCLUDEDIR) {
echo "Boost headers found"
} else {
throw "Boost headers not found"
}
- name: Install boost (mac)
if: matrix.platform == 'macos-latest'
run: |
brew install boost@1.85
echo "BOOST_ROOT=$(brew --prefix boost)" >> $GITHUB_ENV
echo "CXXFLAGS=-I$(brew --prefix boost)/include" >> $GITHUB_ENV
- 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: 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