Skip to content

Fixed Incorrect Hash. #172

Fixed Incorrect Hash.

Fixed Incorrect Hash. #172

Workflow file for this run

name: Build
on:
push:
branches:
- main
- "feature/*"
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Submodules
run: git submodule init && git submodule update
- name: Setup Dart SDK
uses: dart-lang/[email protected]
- name: Fetch Dependencies
run: dart pub get .
- name: Make Build Directories
run: "mkdir -p build/releases/${{ matrix.platform }} &&
mkdir ./scripts/installers/${{ matrix.platform }}/lib"
- name: Build Executable
run: dart compile exe --define=DEBUG=false ./lib/main.dart --target-os ${{ matrix.platform }} -o build/releases/${{ matrix.platform }}/${{ matrix.output}}
- name: Restore Libraries
id: libraries-restore
uses: actions/cache/restore@v4
with:
path: build/releases/${{ matrix.platform }}/lib
key: ${{ runner.os}}-libs-${{ hashFiles('./src/') }}
- name: Build Squirrel
if: steps.libraries-restore.outputs.cache-hit != 'true'
uses: threeal/[email protected]
with:
source-dir: ./src/squirrel3/
build-dir: ./src/squirrel3/
- name: Moving files to build directory
run: ${{ matrix.add-command}}
- name: Cache Libraries
id: cache-libs
if: steps.libraries-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: build/releases/${{ matrix.platform }}/lib
key: ${{steps.libraries-restore.outputs.cache-primary-key}}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: build/releases/${{ matrix.platform }}/
retention-days: 14
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
output: arceus.elf
add-command: "cp --force ./src/squirrel3/lib/libsquirrel.so ./scripts/installers/linux/lib/squirrel.so && cp -r ./scripts/installers/linux/ ./build/releases/"
- os: windows-latest
platform: windows
output: arceus.exe
add-command:
"Copy-Item -Path ./src/squirrel3/bin/Debug/squirrel.dll -Destination ./scripts/installers/windows/lib/squirrel.dll -Force &&
Copy-Item -Recurse -Path ./scripts/installers/windows/ -Destination ./build/releases/ -Force"
# - os: macos-latest
# platform: macos
# output: arceus.app
# path-to-squirrel-library: ./src/squirrel3/squirrel/libsquirrel.so
# rename-squirrel-to: squirrel.dylib