mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Merge pull request #552 from wipe2238/github-action
Updated GitHub Actions setup
This commit is contained in:
@@ -10,6 +10,14 @@ on:
|
|||||||
- '.github/workflows/build.yml'
|
- '.github/workflows/build.yml'
|
||||||
- 'action.yml'
|
- 'action.yml'
|
||||||
- 'sfall/**'
|
- 'sfall/**'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
- 'develop'
|
||||||
|
paths:
|
||||||
|
- '.github/workflows/build.yml'
|
||||||
|
- 'action.yml'
|
||||||
|
- 'sfall/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
@@ -28,13 +36,15 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
release-xp: true
|
release-xp: true
|
||||||
|
dev-xp: false
|
||||||
|
|
||||||
- name: DevXP build
|
- name: DevXP build
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
release-xp: false
|
||||||
dev-xp: true
|
dev-xp: true
|
||||||
|
|
||||||
- name: Prepare artifact
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
:
|
:
|
||||||
mkdir -p sfall-build
|
mkdir -p sfall-build
|
||||||
|
|||||||
+8
-12
@@ -8,9 +8,7 @@ author: '@wipe2238'
|
|||||||
#
|
#
|
||||||
# - name: Build sfall
|
# - name: Build sfall
|
||||||
# id: sfall
|
# id: sfall
|
||||||
# uses: phobos2077/sfall@develop
|
# uses: sfall-team/sfall@master
|
||||||
# with:
|
|
||||||
# release-xp: true
|
|
||||||
#
|
#
|
||||||
# - name: Copy sfall to mod directory
|
# - name: Copy sfall to mod directory
|
||||||
# run: copy "${{ steps.sfall.outputs.release-xp }}" "my/mod/directory/ddraw.dll"
|
# run: copy "${{ steps.sfall.outputs.release-xp }}" "my/mod/directory/ddraw.dll"
|
||||||
@@ -22,11 +20,13 @@ inputs:
|
|||||||
|
|
||||||
release-xp:
|
release-xp:
|
||||||
description: 'Set to true to enable building with ReleaseXP configuration'
|
description: 'Set to true to enable building with ReleaseXP configuration'
|
||||||
required: true
|
required: false
|
||||||
|
default: true
|
||||||
|
|
||||||
dev-xp:
|
dev-xp:
|
||||||
description: 'Set to true to enable building with DevXP configuration'
|
description: 'Set to true to enable building with DevXP configuration'
|
||||||
required: true
|
required: false
|
||||||
|
default: false
|
||||||
|
|
||||||
# Outputs are always using Windows directory separator (`\`)
|
# Outputs are always using Windows directory separator (`\`)
|
||||||
outputs:
|
outputs:
|
||||||
@@ -49,7 +49,7 @@ runs:
|
|||||||
# Quick check for things which should never happen
|
# Quick check for things which should never happen
|
||||||
- name: Sanity checks
|
- name: Sanity checks
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ runner.os }}" != "Windows" ]]; then
|
if [[ "$RUNNER_OS" != "Windows" ]]; then
|
||||||
echo "[ERROR] This action can only be used on Windows"
|
echo "[ERROR] This action can only be used on Windows"
|
||||||
exit 1
|
exit 1
|
||||||
elif [[ "${{ inputs.release-xp }}" != "true" ]] && [[ "${{ inputs.dev-xp }}" != "true" ]]; then
|
elif [[ "${{ inputs.release-xp }}" != "true" ]] && [[ "${{ inputs.dev-xp }}" != "true" ]]; then
|
||||||
@@ -68,7 +68,7 @@ runs:
|
|||||||
|
|
||||||
# DXSDK directory must be prepared only once, in case action is used N times
|
# DXSDK directory must be prepared only once, in case action is used N times
|
||||||
# Using `.lib` suffix to make sure directory is ignored by git in exotic scenarios
|
# Using `.lib` suffix to make sure directory is ignored by git in exotic scenarios
|
||||||
# Using `::set-output` to make sure workflow environment remains unchanged
|
# Using $GITHUB_OUTPUT to make sure workflow environment remains unchanged
|
||||||
- name: Prepare DXSDK directory
|
- name: Prepare DXSDK directory
|
||||||
id: dxsdk
|
id: dxsdk
|
||||||
run: |
|
run: |
|
||||||
@@ -86,7 +86,7 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# MSBuild is not in PATH on Windows machines
|
# MSBuild is not in PATH on Windows machines
|
||||||
# Using `::set-output` to make sure workflow environment remains unchanged
|
# Using $GITHUB_OUTPUT to make sure workflow environment remains unchanged
|
||||||
- name: Prepare MSBuild
|
- name: Prepare MSBuild
|
||||||
id: msbuild
|
id: msbuild
|
||||||
run: |
|
run: |
|
||||||
@@ -98,7 +98,6 @@ runs:
|
|||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Creating empty `PostBuild.cmd` to avoid false-positive build error
|
|
||||||
- name: Build ReleaseXP
|
- name: Build ReleaseXP
|
||||||
id: build-release-xp
|
id: build-release-xp
|
||||||
run: |
|
run: |
|
||||||
@@ -106,7 +105,6 @@ runs:
|
|||||||
echo ::group::Build ReleaseXP
|
echo ::group::Build ReleaseXP
|
||||||
|
|
||||||
#
|
#
|
||||||
# echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
|
|
||||||
"${{ steps.msbuild.outputs.exe }}" "$GITHUB_ACTION_PATH/sfall/ddraw.sln" -p:Configuration=ReleaseXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
|
"${{ steps.msbuild.outputs.exe }}" "$GITHUB_ACTION_PATH/sfall/ddraw.sln" -p:Configuration=ReleaseXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
|
||||||
#
|
#
|
||||||
echo "ddraw-dll=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/ReleaseXP/ddraw.dll")" >> $GITHUB_OUTPUT
|
echo "ddraw-dll=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/ReleaseXP/ddraw.dll")" >> $GITHUB_OUTPUT
|
||||||
@@ -117,7 +115,6 @@ runs:
|
|||||||
DXSDK_DIR: ${{ steps.dxsdk.outputs.dir }}
|
DXSDK_DIR: ${{ steps.dxsdk.outputs.dir }}
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
# Creating empty `PostBuild.cmd` to avoid false-positive build error
|
|
||||||
- name: Build DevXP
|
- name: Build DevXP
|
||||||
id: build-dev-xp
|
id: build-dev-xp
|
||||||
run: |
|
run: |
|
||||||
@@ -126,7 +123,6 @@ runs:
|
|||||||
echo "::group::Build DevXP"
|
echo "::group::Build DevXP"
|
||||||
|
|
||||||
#
|
#
|
||||||
# echo "@echo off" > "$GITHUB_ACTION_PATH/sfall/PostBuild.cmd"
|
|
||||||
"${{ steps.msbuild.outputs.exe }}" "$GITHUB_ACTION_PATH/sfall/ddraw.sln" -p:Configuration=DevXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
|
"${{ steps.msbuild.outputs.exe }}" "$GITHUB_ACTION_PATH/sfall/ddraw.sln" -p:Configuration=DevXP -p:Platform=Win32 -p:PlatformToolset=v140_xp
|
||||||
#
|
#
|
||||||
echo "ddraw-dll=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.dll")" >> $GITHUB_OUTPUT
|
echo "ddraw-dll=$(cygpath --windows "$GITHUB_ACTION_PATH/sfall/DevXP/ddraw.dll")" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user