Skip to content

Commit dc9ed4b

Browse files
committed
fixup! wip: ci
1 parent cd35a80 commit dc9ed4b

4 files changed

Lines changed: 37 additions & 22 deletions

File tree

.github/extension/BuildPhpExtension/private/Get-VsVersion.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ function Get-VsVersion {
2121
if($PhpVersion -eq 'master') { $majorMinor = 'master'; } else { $majorMinor = $PhpVersion.Substring(0, 3); }
2222
$VsVersion = $($VsConfig.php.$majorMinor)
2323
$selectedToolset = $null
24-
25-
Add-StepLog "Visual Studio components version: $VsVersion"
26-
Add-StepLog "Visual Studio components config: $VsConfig"
27-
2824
try {
2925
$selectedToolset = Get-VsVersionHelper -VsVersion $VsVersion -VsConfig $VsConfig
3026
} catch {
3127
Add-Vs -VsVersion $VsVersion -VsConfig $VsConfig
3228
$selectedToolset = Get-VsVersionHelper -VsVersion $VsVersion -VsConfig $VsConfig
3329
}
30+
Add-StepLog "Visual Studio components version: $VsVersion"
31+
Add-StepLog "Visual Studio components config: $VsConfig"
32+
Add-StepLog "Visual Studio components toolset: $selectedToolset"
33+
3434
return [PSCustomObject]@{
3535
vs = $VsVersion
3636
toolset = $selectedToolset

.github/extension/BuildPhpExtension/private/Invoke-Build.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Function Invoke-Build {
2121
ls "$((Get-Location).Path)"
2222
echo ">>> $((Get-Location).Path)\lz4"
2323
ls "$((Get-Location).Path)\lz4"
24+
msbuild -version
2425

2526
$builder = "php-sdk\phpsdk-starter.bat"
2627
$task = [System.IO.Path]::Combine($PSScriptRoot, '..\config\task.bat')

.github/extension/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ runs:
8181
-Arch ${{inputs.arch}} `
8282
-Ts ${{inputs.ts}}
8383
84-
- name: Upload the build artifact
85-
uses: actions/upload-artifact@v4
86-
with:
87-
name: ${{ steps.build.outputs.artifact }}
88-
path: artifacts/*
84+
# - name: Upload the build artifact
85+
# uses: actions/upload-artifact@v4
86+
# with:
87+
# name: ${{ steps.build.outputs.artifact }}
88+
# path: artifacts/*

.github/workflows/win.yaml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,20 +80,34 @@ jobs:
8080
# release: ${{ github.event.release.tag_name }}
8181
# token: ${{ secrets.GITHUB_TOKEN }}
8282

83-
msbuild:
83+
test:
8484
runs-on: windows-2022
8585
steps:
86-
- name: Add msbuild to PATH
87-
uses: microsoft/setup-msbuild@v2
88-
- run: |
89-
msbuild -version
90-
91-
msbuild_16:
92-
runs-on: windows-2022
93-
steps:
94-
- name: Add msbuild to PATH
95-
uses: microsoft/setup-msbuild@v2
86+
- name: Checkout
87+
uses: actions/checkout@v4
9688
with:
97-
vs-version: '16'
98-
- run: |
89+
persist-credentials: false
90+
- name: Checkout submodule
91+
run: .\.github\workflows\submodule.ps1
92+
shell: pwsh
93+
- env:
94+
PHP_VERSION: 8.1
95+
run: |
96+
Import-Module ${{ github.action_path }}\BuildPhpExtension -Force
97+
$VsData = (Get-VsVersion -PhpVersion $env:PHP_VERSION)
98+
if($null -eq $VsData.vs) {
99+
throw "PHP version $PhpVersion is not supported."
100+
}
101+
Add-BuildLog "vs:$VsData.vs"
99102
msbuild -version
103+
shell: pwsh
104+
105+
# msbuild_16:
106+
# runs-on: windows-2022
107+
# steps:
108+
# - name: Add msbuild to PATH
109+
# uses: microsoft/setup-msbuild@v2
110+
# with:
111+
# vs-version: '16'
112+
# - run: |
113+
# msbuild -version

0 commit comments

Comments
 (0)