Skip to content

Pass arguments to binary #41

Pass arguments to binary

Pass arguments to binary #41

Workflow file for this run

name: Build
on:
push:
branches:
- actions-app
paths-ignore:
- '*.{txt,md}'
- 'Tools/**'
- '.{editorconfig,gitattributes,gitignore}'
- 'appveyor.yml'
pull_request:
branches:
- actions-app
paths-ignore:
- '*.{txt,md}'
- 'Tools/**'
- '.{editorconfig,gitattributes,gitignore}'
- 'appveyor.yml'
workflow_dispatch:
env:
BUILD_CONFIGURATION: Release
DEFAULT_BRANCH: actions-app
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
#extra: qt
cc: gcc
cxx: g++
#args: ./b.sh --qt
args: ./b.sh
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Upstream Repo
uses: actions/checkout@v3
#with:
# repository: hrydgard/ppsspp
# ref: master
# submodules: recursive
#- name: Checkout AppImage Repo
# uses: actions/checkout@v3
# with:
# clean: false
# path: ci
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: cache
uses: actions/cache@v3
with:
path: ~/.ccache
key: build-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
build-ccache-
- name: Install Qt
uses: jurplel/install-qt-action@v3
#if: matrix.extra == 'qt'
- name: Install Linux dependencies
if: runner.os == 'Linux' && matrix.extra != 'android'
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install libsdl2-dev libgl1-mesa-dev libglu1-mesa-dev zenity fuse
- name: Clone
id: clone
run: |
mkdir -p "$HOME/.ccache"
cd ..
mv ./ppsspp/ ./ppsspp2
git clone --recursive https://github.com/hrydgard/ppsspp.git && cd ppsspp
- name: Execute build
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
run: ${{ matrix.args }}
- name: Package build
#if: matrix.extra == 'test'
run: |
mkdir Artifacts
if [ -e build/$BUILD_CONFIGURATION/PPSSPP* ]; then
cp build/$BUILD_CONFIGURATION/PPSSPP* Artifacts/
elif [ -e build/PPSSPPSDL.app ]; then
cp -r build/PPSSPPSDL.app Artifacts/
elif [ -e build/PPSSPP* ]; then
cp build/PPSSPP* Artifacts/
7z a assets.zip build/assets
cp assets.zip Artifacts/
fi
if [ -e build/$BUILD_CONFIGURATION/PPSSPPHeadless ]; then
cp build/$BUILD_CONFIGURATION/PPSSPPHeadless Artifacts/
elif [ -e build/PPSSPPHeadless ]; then
cp build/PPSSPPHeadless Artifacts/
fi
realpath . && ls -al .
realpath ./build && ls -al ./build
realpath Artifacts && ls -al Artifacts
- name: AppImage
run: |
chmod +x ./../ppsspp2/.github/scripts/appimage.sh
./../ppsspp2/.github/scripts/appimage.sh
cp ./PPSSPP-x86_64.AppImage* Artifacts/
- name: Upload build
run: |
ls -al Artifacts/
wget -c https://github.com/tcnksm/ghr/releases/download/v0.16.0/ghr_v0.16.0_linux_amd64.tar.gz
tar xfv ghr_v0.16.0_linux_amd64.tar.gz
ghr_v0.16.0_linux_amd64/ghr -u qurious-pixel -r ppsspp -recreate -n 'Continuous build' -b "v1.18.1" continuous Artifacts/