Skip to content

Commit

Permalink
We'll wait to do CI until after release
Browse files Browse the repository at this point in the history
  • Loading branch information
MCJack123 committed Jul 12, 2021
1 parent 8658324 commit 71362bb
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 70 deletions.
132 changes: 66 additions & 66 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,69 +119,69 @@ jobs:
cat ~/.local/share/craftos-pc/computer/0/test-log.txt
if [ -e ~/.retval ]; then exit $(cat ~/.retval); fi
build-windows:

runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Download ROM
run: git clone https://github.com/MCJack123/craftos2-rom "C:\Program Files\CraftOS-PC"
- name: Install dependencies
run: |
git submodule update --init --recursive
(Get-Content -path "C:\vcpkg\ports\poco\portfile.cmake") -replace "ENABLE_NETSSL_WIN", "FORCE_OPENSSL" | Set-Content -Path "C:\vcpkg\ports\poco\portfile.cmake"
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@v7
with:
# Just install vcpkg for now, do not install any ports in this step yet.
setupOnly: true
vcpkgGitCommitId: b1b4808228377515acd849b8706ee2ad25ba455d
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: ${{ hashFiles( 'vcpkg.json' ) }}
vcpkgTriplet: ${{ matrix.triplet }}
# Ensure the vcpkg artifacts are cached, they are generated in the 'CMAKE_BINARY_DIR/vcpkg_installed' directory.
additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
- name: Build CraftOS-PC
run: |
function Invoke-Environment {
param
(
# Any cmd shell command, normally a configuration batch file.
[Parameter(Mandatory=$true)]
[string] $Command
)
$Command = "`"" + $Command + "`""
cmd /c "$Command > nul 2>&1 && set" | . { process {
if ($_ -match '^([^=]+)=(.*)') {
[System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
}
}}
}
Invoke-Environment "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir x64\ReleaseC
mkdir x64\Release
& $Env:VCPKG_ROOT\vcpkg integrate install
$tag = git rev-parse --short HEAD
set ExternalCompilerOptions=/DCRAFTOSPC_COMMIT=\"$tag\"
msbuild "CraftOS-PC 2.sln" /p:Configuration=ReleaseC
- name: Run CraftOSTest
run: |
x64\ReleaseC\CraftOS-PC --headless --script resources\CraftOSTest.lua
echo $LASTEXITCODE > retval.txt
continue-on-error: true
- name: Show logs
run: |
type "%appdata\CraftOS-PC\computer\0\CraftOSTest.log"
$code = Get-Content .\retval.txt
if ( $code -ne 0 ) { exit %EXITCODE% }
- name: Upload artifact
uses: actions/[email protected]
with:
name: CraftOS-PC_${{ github.sha }}
path: |
x64\ReleaseC\CraftOS-PC.exe
x64\ReleaseC\lua51.dll
# build-windows:
#
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v1
# - name: Download ROM
# run: git clone https://github.com/MCJack123/craftos2-rom "C:\Program Files\CraftOS-PC"
# - name: Restore vcpkg cache
# uses: lukka/run-vcpkg@v7
# with:
# # Just install vcpkg for now, do not install any ports in this step yet.
# setupOnly: true
# vcpkgGitCommitId: b1b4808228377515acd849b8706ee2ad25ba455d
# # Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# # compute its hash and append this to the computed cache's key.
# appendedCacheKey: ${{ hashFiles( 'vcpkg.json' ) }}
# vcpkgTriplet: ${{ matrix.triplet }}
# # Ensure the vcpkg artifacts are cached, they are generated in the 'CMAKE_BINARY_DIR/vcpkg_installed' directory.
# additionalCachedPaths: ${{ env.buildDir }}/vcpkg_installed
# - name: Prepare environment
# run: |
# git submodule update --init --recursive
# mkdir x64\ReleaseC
# mkdir x64\Release
# & $Env:VCPKG_ROOT\vcpkg integrate install
# (Get-Content -path "$Env:VCPKG_ROOT\ports\poco\portfile.cmake") -replace "ENABLE_NETSSL_WIN", "FORCE_OPENSSL" | Set-Content -Path "$Env:VCPKG_ROOT\ports\poco#\portfile.cmake"
# - name: Build CraftOS-PC
# run: |
# function Invoke-Environment {
# param
# (
# # Any cmd shell command, normally a configuration batch file.
# [Parameter(Mandatory=$true)]
# [string] $Command
# )
#
# $Command = "`"" + $Command + "`""
# cmd /c "$Command > nul 2>&1 && set" | . { process {
# if ($_ -match '^([^=]+)=(.*)') {
# [System.Environment]::SetEnvironmentVariable($matches[1], $matches[2])
# }
# }}
#
# }
#
# Invoke-Environment "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
# $tag = git rev-parse --short HEAD
# set ExternalCompilerOptions=/DCRAFTOSPC_COMMIT=\"$tag\"
# msbuild "CraftOS-PC 2.sln" /p:Configuration=ReleaseC
# - name: Run CraftOSTest
# run: |
# x64\ReleaseC\CraftOS-PC --headless --script resources\CraftOSTest.lua
# echo $LASTEXITCODE > retval.txt
# continue-on-error: true
# - name: Show logs
# run: |
# type "%appdata\CraftOS-PC\computer\0\CraftOSTest.log"
# $code = Get-Content .\retval.txt
# if ( $code -ne 0 ) { exit %EXITCODE% }
# - name: Upload artifact
# uses: actions/[email protected]
# with:
# name: CraftOS-PC_${{ github.sha }}
# path: |
# x64\ReleaseC\CraftOS-PC.exe
# x64\ReleaseC\lua51.dll
6 changes: 3 additions & 3 deletions CraftOS-PC 2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
<Profile>true</Profile>
</Link>
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;HAVE_STRERROR_S;_DEBUG</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;HAVE_STRERROR_S;__STDC_LIB_EXT1__;_DEBUG</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)api;$(SolutionDir)craftos2-lua\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<LanguageStandard>stdcpp14</LanguageStandard>
Expand Down Expand Up @@ -401,7 +401,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;HAVE_STRERROR_S;WINDOWS_SUBSYSTEM;$(CRASHREPORT_API_KEY)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;HAVE_STRERROR_S;__STDC_LIB_EXT1__;WINDOWS_SUBSYSTEM;$(CRASHREPORT_API_KEY)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)api;$(SolutionDir)craftos2-lua\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<Optimization>MaxSpeed</Optimization>
Expand Down Expand Up @@ -497,7 +497,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;HAVE_STRERROR_S;$(CRASHREPORT_API_KEY)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;HAVE_STRERROR_S;__STDC_LIB_EXT1__;$(CRASHREPORT_API_KEY)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(SolutionDir)api;$(SolutionDir)craftos2-lua\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<Optimization>MaxSpeed</Optimization>
Expand Down
2 changes: 1 addition & 1 deletion craftos2-lua

0 comments on commit 71362bb

Please sign in to comment.