Another attempt to fix CI

This commit is contained in:
Adam Demasi 2024-09-30 16:55:19 +09:30
parent 1cbb833085
commit 23d48e85e9
No known key found for this signature in database
GPG key ID: 5D3B26B3D58C7D91
3 changed files with 18 additions and 11 deletions

View file

@ -55,7 +55,7 @@ jobs:
id: build
run: |
export PATH=/opt/gcc-13.2-binutils-2.41-mingw-v11.0.1-i686/bin:$PATH
make CI=1 SIGN=0
make CI=1 DEBUG=0
echo "out=$(echo setup/LegacyUpdate-*.exe)" >> "$(wslpath -u "$GITHUB_OUTPUT")"
- name: Upload Build Artifact

View file

@ -1,8 +1,13 @@
override DEBUG := $(or $(DEBUG),1)
MSBUILDCONFIG = $(if $(filter 1,$(DEBUG)),Debug-VC08,Release)
ifeq ($(CI)$(DEBUG),11)
MSBUILDCONFIG = Debug-VC17
MSBUILDCONFIG32 = $(if $(filter 1,$(DEBUG)),Debug-VC08,Release)
MSBUILDCONFIG64 = $(if $(filter 1,$(DEBUG)),Debug-VC17,Release)
ifeq ($(CI),1)
ifeq ($(DEBUG),1)
MSBUILDCONFIG32 = Debug-VC17
endif
MSBUILDFLAGS += /p:PlatformToolset=v141_xp
endif
VSPATH ?= $(shell wslpath "$(shell '/mnt/c/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe' -latest -property installationPath)")
@ -11,11 +16,11 @@ PATH := $(VSPATH)/MSBuild/Current/Bin:$(PATH)
MSBUILD = msbuild.exe
all:
@# Unfortunately always needs to be a clean build because of "dlldatax.obj: error LNK2001:
@# unresolved external symbol _LegacyUpdate_ProxyFileInfo"
+$(MAKE) clean
cd ..; $(MSBUILD) LegacyUpdate.sln /v:minimal /m /p:Configuration=$(MSBUILDCONFIG) /p:Platform=Win32
cd ..; $(MSBUILD) LegacyUpdate.sln /v:minimal /m /p:Configuration=$(MSBUILDCONFIG) /p:Platform=x64
@# Workaround for "dlldatax.obj: LNK2001: unresolved external symbol _LegacyUpdate_ProxyFileInfo"
rm -f LegacyUpdate_p.c
cd ..; $(MSBUILD) LegacyUpdate.sln /v:minimal /m /p:Configuration=$(MSBUILDCONFIG32) /p:Platform=Win32 $(MSBUILDFLAGS)
rm -f LegacyUpdate_p.c
cd ..; $(MSBUILD) LegacyUpdate.sln /v:minimal /m /p:Configuration=$(MSBUILDCONFIG64) /p:Platform=x64 $(MSBUILDFLAGS)
ifeq ($(SIGN),1)
../build/sign.sh \
@ -24,7 +29,8 @@ ifeq ($(SIGN),1)
endif
clean:
cd ..; $(MSBUILD) LegacyUpdate.sln /v:quiet /m /p:Configuration=$(MSBUILDCONFIG) /p:Platform=Win32 /t:clean
cd ..; $(MSBUILD) LegacyUpdate.sln /v:quiet /m /p:Configuration=$(MSBUILDCONFIG) /p:Platform=x64 /t:clean
rm -rf \
Debug-VC08 Debug-VC17 Release x64 \
LegacyUpdate_i.c LegacyUpdate_i.h LegacyUpdate_p.c LegacyUpdateidl.h
.PHONY: all clean

View file

@ -1,3 +1,4 @@
export CI ?= 0
export SIGN ?= 0
export DEBUG ?= 1