Generalized pwm #644
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: xpinmame | |
on: | |
push: | |
pull_request: | |
env: | |
VERSION_START_SHA: e87be0e3cfa66411976ca04a72dd29e36c483966 | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
version: | |
name: Version | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.version }} | |
revision: ${{ steps.version.outputs.revision }} | |
sha: ${{ steps.version.outputs.sha }} | |
tag: ${{ steps.version.outputs.tag }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- id: version | |
run: | | |
VERSION=$(grep -Eo "[0-9\.]+" src/version.c | head -1) | |
REVISION=$(git rev-list ${{ env.VERSION_START_SHA }}..HEAD --count) | |
SHA="${GITHUB_SHA}" | |
SHA7="${SHA::7}" | |
TAG="${VERSION}-${REVISION}-${SHA7}" | |
echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
echo "revision=${REVISION}" >> $GITHUB_OUTPUT | |
echo "sha=${SHA}" >> $GITHUB_OUTPUT | |
echo "tag=${TAG}" >> $GITHUB_OUTPUT | |
build: | |
name: Build xpinmame-${{ matrix.platform }} | |
runs-on: ${{ matrix.os }} | |
needs: [ version ] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-latest | |
platform: osx-x64 | |
exe: xpinmame | |
steps: | |
- uses: actions/checkout@v3 | |
- if: matrix.os == 'macos-latest' | |
run: | | |
brew install xquartz | |
- name: Build xpinmame-${{ matrix.platform }} | |
run: | | |
cp cmake/xpinmame/CMakeLists_${{ matrix.platform }}.txt CMakeLists.txt | |
cmake -DCMAKE_BUILD_TYPE=Release -B build/Release | |
cmake --build build/Release | |
- run: | | |
mkdir tmp | |
cp build/Release/${{ matrix.exe }} tmp | |
cp release/gamelist.txt tmp | |
cp release/license.txt tmp | |
cp release/pinmame.txt tmp | |
cp release/whatsnew.txt tmp | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: xpinmame-${{ needs.version.outputs.tag }}-${{ matrix.platform }} | |
path: tmp |