Skip to content

docs update

docs update #483

Workflow file for this run

name: build
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
env:
FPC_VER: release_3_2_2
LAZ_VER: fixes_3_0
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.runs-on }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
config:
- name: Windows 64
runs-on: windows-latest
build-mode: WIN64
binary: Simba-Win64.exe
test: Simba-Win64.exe
- name: Windows 32
runs-on: windows-latest
build-mode: WIN32
binary: Simba-Win32.exe
test: Simba-Win32.exe
- name: Linux 64
runs-on: ubuntu-20.04
build-mode: LINUX64
binary: Simba-Linux64
test: Simba-Linux64
- name: Linux AArch64
runs-on: ubuntu-20.04
build-mode: LINUX-AARCH64
binary: Simba-Linux-AArch64
- name: MacOS 64
runs-on: macos-latest
build-mode: MACOS64
binary: Simba-MacOS.dmg
test: Simba
- name: MacOS AArch64
runs-on: macos-latest
build-mode: MACOS-AARCH64
binary: Simba-MacOS-AArch64.dmg
steps:
- name: Install Lazarus
uses: ollydev/setup-lazarus-fpcup@v3.3
with:
laz: ${{ env.LAZ_VER }}
fpc: ${{ env.FPC_VER }}
- uses: actions/checkout@v3.5.3
with:
submodules: true
- name: Build Simba
run: |
export GITHUB_SHORT_SHA=$(git rev-parse --short HEAD)
lazbuild --build-mode=${{ matrix.config.build-mode }} "Source/Simba.lpi"
- name: Sign MacOS App Bundle
if: matrix.config.runs-on == 'macos-latest'
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output certificate.p12
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain
security import certificate.p12 -k build.keychain -P "$P12_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain
codesign --deep --sign "7ACAD7EE0AA3A0783CE9592567098A3F08FC0B0B" Simba.app
codesign -v Simba.app
brew install create-dmg
create-dmg --window-size 500 330 --icon-size 48 --icon "Simba.app" 130 135 --app-drop-link 380 135 --background "Source/macosbundle/installer.tff" "${{ matrix.config.binary }}" "Simba.app"
#ditto -c -k --sequesterRsrc --keepParent Simba.app ${{ matrix.config.binary }}
- name: Test Simba
if: matrix.config.test != ''
run: |
if [[ "${{ matrix.config.runs-on }}" == ubuntu* ]]; then
export DISPLAY=:1
Xvfb :1 & sleep 2
fi
chmod +x ${{ matrix.config.test }}
./${{ matrix.config.test }} --run "Tests/RunTests/tester.simba"
- name: Upload Simba Binary
uses: actions/upload-artifact@v3.1.2
with:
name: ${{ matrix.config.binary }}
path: ${{ matrix.config.binary }}