Skip to content

Only build x86 (AnyCPU) version #165

Only build x86 (AnyCPU) version

Only build x86 (AnyCPU) version #165

Workflow file for this run

name: b2s-backglass
on:
push:
defaults:
run:
shell: bash
jobs:
build-server:
name: Build B2SServer-${{ matrix.config }}-win-${{ matrix.platform }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- platform: x86
config: Debug
- platform: x86
config: Release
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: DirectOutput/B2SServerPluginInterface
path: B2SServerPluginInterface
- id: version
name: Update AssemblyInformationalVersion
run: |
SHA7="${GITHUB_SHA::7}"
ASSEMBLY_INFO="B2SServerPluginInterface/B2SServerPluginInterface/Properties/AssemblyInfo.cs"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
echo -e "\n[assembly: AssemblyInformationalVersion(\"${TAG}\")]" >> "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2s_screenresidentifier/b2s_screenresidentifier/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassserverexe/b2sbackglassserverexe/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassserverregisterapp/b2sbackglassserverregisterapp/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassserver/b2sbackglassserver/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
ASSEMBLY_INFO="B2SWindowPunch/B2SWindowPunch/Properties/AssemblyInfo.cs"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
- uses: microsoft/[email protected]
- name: Build B2SServerPluginInterface
run: |
msbuild B2SServerPluginInterface/B2SServerPluginInterface.sln /t:Rebuild /p:Configuration=${{ matrix.config }}
shell: cmd
- run: |
cp B2SServerPluginInterface/B2SServerPluginInterface/bin/${{ matrix.config }}/B2SServerPluginInterface.dll b2sbackglassserver/b2sbackglassserver/Plugin
if [[ "${{ matrix.config }}" == "Debug" ]]; then
cp B2SServerPluginInterface/B2SServerPluginInterface/bin/${{ matrix.config }}/B2SServerPluginInterface.pdb b2sbackglassserver/b2sbackglassserver/Plugin
fi
- name: Build Server
run: |
msbuild b2s_screenresidentifier/B2S_ScreenResIdentifier.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
msbuild b2sbackglassserverexe/B2SBackglassServerEXE.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
msbuild b2sbackglassserverregisterapp/B2SBackglassServerRegisterApp.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
msbuild b2sbackglassserver/B2SBackglassServer.sln /t:Rebuild /p:Configuration=${{ matrix.config }}
msbuild B2SWindowPunch/B2SWindowPunch.sln /t:Rebuild /p:Configuration=${{ matrix.config }}
shell: cmd
- name: Bundle
run: |
mkdir tmp
cp b2s_screenresidentifier/b2s_screenresidentifier/bin/${{ matrix.platform }}/${{ matrix.config }}/B2S_ScreenResIdentifier.exe tmp
cp b2s_screenresidentifier/b2s_screenresidentifier/bin/${{ matrix.platform }}/${{ matrix.config }}/B2S_ScreenResIdentifier.exe.config tmp
cp b2sbackglassserverexe/b2sbackglassserverexe/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerEXE.exe tmp
cp b2sbackglassserverexe/b2sbackglassserverexe/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerEXE.exe.config tmp
cp b2sbackglassserverregisterapp/b2sbackglassserverregisterapp/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerRegisterApp.exe tmp
cp b2sbackglassserver/b2sbackglassserver/bin/${{ matrix.config }}/B2SServerPluginInterface.dll tmp
cp b2sbackglassserver/b2sbackglassserver/bin/${{ matrix.config }}/B2SBackglassServer.dll tmp
cp b2sbackglassserver/b2sbackglassserver/B2SInit.cmd tmp
cp B2SWindowPunch/B2SWindowPunch/bin/${{ matrix.config }}/B2SWindowPunch.exe tmp
if [[ "${{ matrix.config }}" == "Debug" ]]; then
cp b2s_screenresidentifier/b2s_screenresidentifier/bin/${{ matrix.platform }}/${{ matrix.config }}/B2S_ScreenResIdentifier.pdb tmp
cp b2sbackglassserverexe/b2sbackglassserverexe/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerEXE.pdb tmp
cp b2sbackglassserverregisterapp/b2sbackglassserverregisterapp/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassServerRegisterApp.pdb tmp
cp b2sbackglassserver/b2sbackglassserver/bin/${{ matrix.config }}/B2SServerPluginInterface.pdb tmp
cp b2sbackglassserver/b2sbackglassserver/bin/${{ matrix.config }}/B2SBackglassServer.pdb tmp
cp B2SWindowPunch/B2SWindowPunch/bin/${{ matrix.config }}/B2SWindowPunch.pdb tmp
fi
mkdir tmp/Plugins tmp/Plugins64
cp Plugins.txt tmp/Plugins
cp Plugins.txt tmp/Plugins64
cp Changelog.txt tmp
cp license.txt tmp
cp README.md tmp/README.txt
cp ScreenResTemplate.txt tmp
cp -r ScreenResTemplates tmp
cp -r B2STools tmp
cp b2sbackglassserverregisterapp/ScreenResTemplates.cmd tmp
- uses: actions/upload-artifact@v3
with:
name: B2SServer-${{ steps.version.outputs.tag }}-${{ matrix.config }}-win-${{ matrix.platform }}
path: tmp
build-betterled:
if: ${{ false }} # disable for now
name: Build BetterLed # -${{ matrix.config }}-win-${{ matrix.platform }}
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
include:
- platform: x86
config: Debug
- platform: x86
config: Release
- platform: x64
config: Debug
- platform: x64
config: Release
steps:
- uses: actions/checkout@v3
- id: version
name: Update AssemblyInformationalVersion
run: |
SHA7="${GITHUB_SHA::7}"
ASSEMBLY_INFO="leds/dream7segments/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="leds/BetterLed/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: microsoft/[email protected]
- name: Build
run: |
msbuild leds/BetterLed/BetterLed.sln /t:Rebuild /p:Configuration=${{ matrix.config }} /p:Platform=${{ matrix.platform }}
shell: cmd
- name: Bundle
run: |
mkdir tmp
cp leds/BetterLed/bin/${{ matrix.platform }}/${{ matrix.config }}/BetterLed.exe tmp
cp leds/BetterLed/bin/${{ matrix.platform }}/${{ matrix.config }}/Dream7Display.dll tmp
if [[ "${{ matrix.config }}" == "Debug" ]]; then
cp leds/BetterLed/bin/${{ matrix.platform }}/${{ matrix.config }}/BetterLed.pdb tmp
cp leds/BetterLed/bin/${{ matrix.platform }}/${{ matrix.config }}/Dream7Display.pdb tmp
fi
cp license.txt tmp
- uses: actions/upload-artifact@v3
with:
name: BetterLed-${{ steps.version.outputs.tag }}-${{ matrix.config }}-win-${{ matrix.platform }}
path: tmp