Skip to content

Nightly

Nightly #669

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Nightly
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
build-resources:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: 'Install dependencies'
run: |
sudo apt-get update
sudo apt-get install gettext
mkdir out/
- name: 'Generate i18n'
run: |
# Build translations
mkdir otl/
if [ -n `$(find tl/ -name "*.po" 2>/dev/null)` ]
then
echo "No translations, skipping..."
else
sudo chmod +x gentl.sh
./gentl.sh
cp out/* otl/
fi
- name: Make Artifact
uses: actions/upload-artifact@v3
with:
name: translations
path: otl/*
retention-days: 1
linux-zip:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7
with:
compiler: ldc-latest
- name: "Get build dependencies"
run: |
sudo apt install libsdl2-dev libfreetype6-dev gettext
- name: 'Generate i18n'
run: |
sudo chmod +x gentl.sh
./gentl.sh
- name: "Clone dependencies & set versions"
run: |
git clone https://github.com/Inochi2D/i2d-imgui.git --recurse-submodules
git clone https://github.com/Inochi2D/inochi2d.git
dub add-local i2d-imgui/ "0.8.0"
dub add-local inochi2d/ "0.8.2"
- name: 'Build Inochi Session'
run: |
# Build metadata (like version information and icons)
dub build --config=meta
# Build the project, with its main file included, without unittests
dub build --compiler=ldc2 --config=linux-nightly --debug=InExperimental
- name: Archive Zip
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: 'inochi-session-linux-x86_64.zip'
directory: 'out/'
path: '*'
- name: Release to nightly tag
uses: softprops/action-gh-release@v1
with:
name: 'Nightly Build'
tag_name: nightly
files: |
out/inochi-session-linux-x86_64.zip
generate_release_notes: true
windows-zip:
runs-on: windows-latest
needs: build-resources
steps:
- uses: actions/checkout@v3
- uses: dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7
with:
compiler: ldc-latest
- name: Download translations
continue-on-error: true
uses: actions/download-artifact@v3
with:
name: translations
path: out/i18n/
- name: "Clone dependencies & set versions"
run: |
git clone https://github.com/Inochi2D/i2d-imgui.git --recurse-submodules
git clone https://github.com/Inochi2D/inochi2d.git
dub add-local i2d-imgui/ "0.8.0"
dub add-local inochi2d/ "0.8.2"
- name: 'Build Inochi Session'
run: |
function Invoke-VSDevEnvironment {
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$installationPath = & $vswhere -prerelease -legacy -latest -property installationPath
$Command = Join-Path $installationPath "Common7\Tools\vsdevcmd.bat"
& "${env:COMSPEC}" /s /c "`"$Command`" -no_logo && set" | Foreach-Object {
if ($_ -match '^([^=]+)=(.*)') {
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
}
}
}
Invoke-VSDevEnvironment
# Build metadata (like version information and icons)
dub build --config=meta
# Build the project, with its main file included, without unittests
dub build --compiler=ldc2 --config=win32-nightly --debug=InExperimental
- name: Archive Zip
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: 'inochi-session-win32-x86_64.zip'
directory: 'out/'
path: '*'
- name: Release to nightly tag
uses: softprops/action-gh-release@v1
with:
name: 'Nightly Build'
tag_name: nightly
files: 'out/inochi-session-win32-x86_64.zip'
macOS-dmg:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- uses: LunaTheFoxgirl/setup-dlang@v1
with:
compiler: ldc-latest
- name: "Prepare for DMG packing"
run: |
brew update
brew install create-dmg gettext
# Remove conflicting brew items
brew remove --ignore-dependencies aom cairo composer curl fontconfig freetype gd ghostscript httpd imagemagick jpeg-xl libavif libheif libxft mongodb-community@5.0 mongosh node@16 openjpeg php r sox webp libpng brotli
# Delete fake harfbuzz if need be
if [ -f "/usr/local/lib/libharfbuzz.dylib" ]; then
sudo rm -r /usr/local/lib/libharfbuzz.dylib
fi
# And the .a for it as well
if [ -f "/usr/local/lib/libharfbuzz.a" ]; then
sudo rm -r /usr/local/lib/libharfbuzz.a
fi
- name: 'Generate i18n'
run: |
sudo chmod +x gentl.sh
./gentl.sh
- name: "Clone dependencies & set versions"
run: |
git clone https://github.com/Inochi2D/i2d-imgui.git --recurse-submodules
git clone https://github.com/Inochi2D/inochi2d.git
dub add-local i2d-imgui/ "0.8.0"
dub add-local inochi2d/ "0.8.2"
- name: 'Build Inochi Session'
env:
DFLAGS: "-g -force-dwarf-frame-section=false"
run: |
# Build metadata (like version information and icons)
dub build --config=meta
# First build ARM64 version...
echo "Building arm64 binary..."
dub build --config=osx-nightly --arch=arm64-apple-macos
mv "out/Inochi Session.app/Contents/MacOS/inochi-session" "out/Inochi Session.app/Contents/MacOS/inochi-session-arm64"
# Then the X86_64 version...
echo "Building x86_64 binary..."
dub build --config=osx-nightly --arch=x86_64-apple-macos
mv "out/Inochi Session.app/Contents/MacOS/inochi-session" "out/Inochi Session.app/Contents/MacOS/inochi-session-x86_64"
# Glue them together with lipo
echo "Gluing them together..."
lipo "out/Inochi Session.app/Contents/MacOS/inochi-session-x86_64" "out/Inochi Session.app/Contents/MacOS/inochi-session-arm64" -output "out/Inochi Session.app/Contents/MacOS/inochi-session" -create
# Print some nice info
echo "Done!"
lipo -info "out/Inochi Session.app/Contents/MacOS/inochi-session"
# Cleanup and bundle
echo "Cleaning up..."
rm "out/Inochi Session.app/Contents/MacOS/inochi-session-x86_64" "out/Inochi Session.app/Contents/MacOS/inochi-session-arm64"
./build-aux/osx/osxbundle.sh
- name: 'Build DMG'
run: |
./build-aux/osx/gendmg.sh
- name: Release to nightly tag
uses: softprops/action-gh-release@v1
with:
name: 'Nightly Build'
tag_name: nightly
files: 'out/Install_Inochi_Session.dmg'