mirror of
https://github.com/DaedalusX64/daedalus.git
synced 2024-06-01 18:58:00 -04:00
226 lines
6.2 KiB
YAML
226 lines
6.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
repository_dispatch:
|
|
types: [run_build]
|
|
|
|
jobs:
|
|
build-psp:
|
|
name: PSP Build
|
|
runs-on: ubuntu-latest
|
|
container: pspdev/pspdev:latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
apk add build-base git bash cmake
|
|
|
|
- name: Compile project
|
|
run: |
|
|
./build_daedalus.sh PSP
|
|
|
|
- name: Get short SHA
|
|
id: slug
|
|
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
|
|
|
- name: Prepare artifacts
|
|
run: |
|
|
tar -zcvf daedalusX64-PSP.tar.gz \
|
|
DaedalusX64/Plugins \
|
|
DaedalusX64/EBOOT.PBP \
|
|
DaedalusX64/roms.ini \
|
|
DaedalusX64/readme.txt \
|
|
DaedalusX64/copying.txt \
|
|
DaedalusX64/Resources \
|
|
DaedalusX64/Languages \
|
|
DaedalusX64/ControllerConfigs \
|
|
|
|
|
|
- name: Upload artifacts
|
|
if: ${{ success() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: DaedalusX64-PSP
|
|
path: daedalusX64-PSP.tar.gz
|
|
|
|
- name: Extract tag name
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
id: tag
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
|
|
# - name: Create pre-release
|
|
# if: github.ref == 'refs/heads/master'
|
|
# uses: softprops/action-gh-release@v1
|
|
# with:
|
|
# files: daedalusX64-PSP.tar.gz
|
|
# prerelease: true
|
|
# name: "Development build"
|
|
# tag_name: "latest"
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# - name: Release
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
# uses: softprops/action-gh-release@v1
|
|
# with:
|
|
# files: daedalusX64-PSP.tar.gz
|
|
# tag_name: ${{ steps.tag.outputs.VERSION }}
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# name: CI
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt install build-essential git bash cmake libpng-dev libz-dev libminizip-dev libsdl2-dev libsdl2-ttf-dev libglew-dev
|
|
|
|
- name: Compile project
|
|
run: |
|
|
./build_daedalus.sh
|
|
|
|
- name: Get short SHA
|
|
id: slug
|
|
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
|
|
|
- name: Prepare artifacts
|
|
run: |
|
|
tar -zcvf daedalusX64-linux.tar.gz \
|
|
DaedalusX64/daedalus \
|
|
DaedalusX64/n64.psh \
|
|
DaedalusX64/roms.ini \
|
|
DaedalusX64/readme.txt \
|
|
DaedalusX64/copying.txt \
|
|
DaedalusX64/Resources \
|
|
DaedalusX64/Languages \
|
|
DaedalusX64/ControllerConfigs \
|
|
|
|
|
|
- name: Upload artifacts
|
|
if: ${{ success() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: daedalusX64-linux
|
|
path: daedalusX64-linux.tar.gz
|
|
|
|
# - name: Extract tag name
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
# id: tag
|
|
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
|
|
# - name: Create pre-release
|
|
# if: github.ref == 'refs/heads/master'
|
|
# uses: softprops/action-gh-release@v1
|
|
# with:
|
|
# files: daedalusX64-linux.tar.gz
|
|
# prerelease: true
|
|
# name: "Development build"
|
|
# tag_name: "latest"
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# - name: Release
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
# uses: softprops/action-gh-release@v1
|
|
# with:
|
|
# files: daedalusX64-linux.tar.gz
|
|
# tag_name: ${{ steps.tag.outputs.VERSION }}
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build-macos:
|
|
runs-on: macOS-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Homebrew # This will install the correct homebrew for architecture selected
|
|
run: |
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install git bash cmake libpng minizip sdl2 sdl2_ttf glew
|
|
|
|
- name: Compile project
|
|
run: |
|
|
./build_daedalus.sh
|
|
|
|
- name: Get short SHA
|
|
id: slug
|
|
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
|
|
|
- name: Prepare artifacts
|
|
run: |
|
|
tar -zcvf daedalusX64-macos-x86.tar.gz \
|
|
DaedalusX64/daedalus \
|
|
DaedalusX64/n64.psh \
|
|
DaedalusX64/roms.ini \
|
|
DaedalusX64/readme.txt \
|
|
DaedalusX64/copying.txt \
|
|
DaedalusX64/Resources \
|
|
DaedalusX64/Languages \
|
|
DaedalusX64/ControllerConfigs \
|
|
|
|
|
|
- name: Upload artifacts
|
|
if: ${{ success() }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: DaedalusX64-macos
|
|
path: daedalusX64-macos-x86.tar.gz
|
|
|
|
# - name: Extract tag name
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
# id: tag
|
|
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
|
|
# - name: Create pre-release
|
|
# if: github.ref == 'refs/heads/master'
|
|
# uses: softprops/action-gh-release@v1
|
|
# with:
|
|
# files: daedalusX64-macos-x86.tar.gz
|
|
# prerelease: true
|
|
# name: "Development build"
|
|
# tag_name: "latest"
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
# - name: Release
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
# uses: softprops/action-gh-release@v1
|
|
# with:
|
|
# files: daedalusX64-macos-x86.tar.gz
|
|
# tag_name: ${{ steps.tag.outputs.VERSION }}
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
envs:
|
|
VCPKG_DEFAULT_TRIPLET: x64-windows
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: lukka/get-cmake@latest
|
|
|
|
- name: Setup a new (or from cache) vcpkg
|
|
uses: lukka/run-vcpkg@v11
|
|
with:
|
|
vcpkgGitCommitId: aa628ceb5f15f0c30d4d481f14fa5b2be2b4a658
|
|
runVcpkgInstall: true
|
|
|
|
- name: Run CMake config
|
|
run: |
|
|
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=$ENV:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -G "Visual Studio 16 2019" -A x64
|
|
|
|
- name: Build
|
|
run: |
|
|
cmake --build build --config Release
|