Skip to content

Commit c862138

Browse files
committed
test
Signed-off-by: hugsy <crazy.hugsy@outlook.com>
1 parent 73ab4ea commit c862138

File tree

2 files changed

+47
-43
lines changed

2 files changed

+47
-43
lines changed

.github/build-bochscpu.ps1

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
$ErrorActionPreference = "Stop"
2-
32
Push-Location
43

54
New-Item -ItemType Directory -Name bxbuild
@@ -9,7 +8,7 @@ git clone https://github.com/yrp604/bochscpu-build.git
98
git clone https://github.com/yrp604/bochscpu.git
109
git clone https://github.com/yrp604/bochscpu-ffi.git
1110

12-
bash -c "cd bochscpu-build && bash prep.sh && cd Bochs/bochs && bash .conf.cpu-msvc"
11+
bash -c "cd bochscpu-build && bash prep.sh && cd Bochs/bochs && bash .conf.cpu-msvc && find ./cpu . -type f -name Makefile -exec sed -i 's?/MT?/MD?g' {} \;"
1312

1413
Set-Location bochscpu-build\Bochs\bochs
1514
$env:CL = "/MP$env:NUMBER_OF_PROCESSORS"
@@ -19,18 +18,15 @@ nmake cpu\avx\libavx.a
1918
nmake cpu\cpudb\libcpudb.a
2019
nmake cpu\libcpu.a
2120

22-
# Don't actually need the rest
23-
# nmake
24-
2521
Remove-Item -Recurse -Force -ErrorAction Ignore ..\..\..\bochscpu\bochs
2622
Remove-Item -Recurse -Force -ErrorAction Ignore ..\..\..\bochscpu\lib
2723

2824
New-Item -ItemType Directory -Name ..\..\..\bochscpu\lib
29-
Copy-Item cpu\libcpu.a ..\..\..\bochscpu\lib\cpu.lib
30-
Copy-Item cpu\fpu\libfpu.a ..\..\..\bochscpu\lib\fpu.lib
31-
Copy-Item cpu\avx\libavx.a ..\..\..\bochscpu\lib\avx.lib
32-
Copy-Item cpu\cpudb\libcpudb.a ..\..\..\bochscpu\lib\cpudb.lib
33-
Copy-Item cpu\softfloat3e\libsoftfloat.a ..\..\..\bochscpu\lib\softfloat.lib
25+
Copy-Item -Verbose cpu\libcpu.a ..\..\..\bochscpu\lib\cpu.lib
26+
Copy-Item -Verbose cpu\fpu\libfpu.a ..\..\..\bochscpu\lib\fpu.lib
27+
Copy-Item -Verbose cpu\avx\libavx.a ..\..\..\bochscpu\lib\avx.lib
28+
Copy-Item -Verbose cpu\cpudb\libcpudb.a ..\..\..\bochscpu\lib\cpudb.lib
29+
Copy-Item -Verbose cpu\softfloat3e\libsoftfloat.a ..\..\..\bochscpu\lib\softfloat.lib
3430

3531
New-Item -ItemType Directory -Name ..\..\..\bochscpu\bochs
3632
Copy-Item -Recurse -Force . ..\..\..\bochscpu

.github/workflows/build.yml

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,25 @@ on:
1111
env:
1212
NB_CPU: 1
1313
VERSION: '0.5.0'
14-
BOCHS_REV: 3cf98b28541d337270c34b1068113fef294551a2
14+
# BOCHS_REV: f75e315b289ca3409ed02bce0e141bb3fccdb35c
15+
BOCHS_REV: b64f49ea56e191a2d3a3f010d9f6b167c5beb7a0
1516

1617
jobs:
1718
bochscpu:
1819
strategy:
1920
fail-fast: false
2021
matrix:
2122
variant:
22-
- {os: windows-2019, arch: x64}
23-
- {os: windows-2022, arch: x64}
24-
- {os: ubuntu-22.04, arch: x64}
25-
- {os: ubuntu-24.04, arch: x64}
26-
- {os: ubuntu-24.04-arm, arch: arm64}
27-
- {os: macos-13, arch: x64}
28-
- {os: macos-14, arch: arm64}
29-
- {os: macos-15, arch: arm64}
23+
# - {os: windows-2019, arch: x64}
24+
# - {os: windows-2022, arch: x64}
25+
- {os: windows-2025, arch: x64}
26+
# - {os: windows-11-arm, arch: arm64}
27+
# - {os: ubuntu-22.04, arch: x64}
28+
# - {os: ubuntu-24.04, arch: x64}
29+
# - {os: ubuntu-24.04-arm, arch: arm64}
30+
# - {os: macos-13, arch: x64}
31+
# - {os: macos-14, arch: arm64}
32+
# - {os: macos-15, arch: arm64}
3033
runs-on: ${{ matrix.variant.os }}
3134
name: bochscpu / ${{ matrix.variant.os }} / ${{ matrix.variant.arch }}
3235
steps :
@@ -62,11 +65,14 @@ jobs:
6265
- name: Build BochsCPU (Windows)
6366
if: steps.cache-artifacts.outputs.cache-hit != 'true' && startsWith(matrix.variant.os, 'windows-')
6467
run: |
68+
mkdir artifact
69+
mkdir artifact/debug
70+
mkdir artifact/release
71+
mkdir artifact/relwithdebinfo
6572
.\.github\build-bochscpu.ps1
66-
mkdir artifact; mkdir artifact/release; mkdir artifact/debug; mkdir artifact/relwithdebinfo
67-
cp -Verbose bxbuild/bochscpu-ffi/target/release/*.lib artifact/release/
6873
cp -Verbose bxbuild/bochscpu-ffi/target/debug/*.lib artifact/debug/
69-
cp -Verbose bxbuild/bochscpu-ffi/target/debug/*.lib artifact/relwithdebinfo/
74+
cp -Verbose bxbuild/bochscpu-ffi/target/release/*.lib artifact/release/
75+
cp -Verbose bxbuild/bochscpu-ffi/target/release/*.lib artifact/relwithdebinfo/
7076
7177
- name: Build BochsCPU (Linux & MacOS)
7278
if: steps.cache-artifacts.outputs.cache-hit != 'true' && startsWith(matrix.variant.os, 'windows-') == false
@@ -75,7 +81,7 @@ jobs:
7581
mkdir artifact artifact/Release artifact/Debug artifact/RelWithDebInfo
7682
cp -v bxbuild/bochscpu-ffi/target/release/lib*.a artifact/Release/
7783
cp -v bxbuild/bochscpu-ffi/target/debug/lib*.a artifact/Debug/
78-
cp -v bxbuild/bochscpu-ffi/target/debug/lib*.a artifact/RelWithDebInfo/
84+
cp -v bxbuild/bochscpu-ffi/target/release/lib*.a artifact/RelWithDebInfo/
7985
8086
- name: Upload artifacts
8187
uses: actions/upload-artifact@v4
@@ -91,14 +97,15 @@ jobs:
9197
matrix:
9298
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
9399
variant:
94-
- {os: windows-2019, arch: x64, config: RelWithDebInfo, py-arch: x64}
95-
- {os: windows-2022, arch: x64, config: RelWithDebInfo, py-arch: x64}
96-
- {os: ubuntu-22.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
97-
- {os: ubuntu-24.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
98-
- {os: ubuntu-24.04-arm, arch: arm64, config: RelWithDebInfo, py-arch: arm64}
99-
- {os: macos-13, arch: x64, config: Release, py-arch: x64}
100-
- {os: macos-14, arch: arm64, config: Release, py-arch: arm64}
101-
- {os: macos-15, arch: arm64, config: Release, py-arch: arm64}
100+
# - {os: windows-2019, arch: x64, config: RelWithDebInfo, py-arch: x64}
101+
# - {os: windows-2022, arch: x64, config: RelWithDebInfo, py-arch: x64}
102+
- {os: windows-2025, arch: x64, config: RelWithDebInfo, py-arch: x64}
103+
# - {os: ubuntu-22.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
104+
# - {os: ubuntu-24.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
105+
# - {os: ubuntu-24.04-arm, arch: arm64, config: RelWithDebInfo, py-arch: arm64}
106+
# - {os: macos-13, arch: x64, config: Release, py-arch: x64}
107+
# - {os: macos-14, arch: arm64, config: Release, py-arch: arm64}
108+
# - {os: macos-15, arch: arm64, config: Release, py-arch: arm64}
102109
runs-on: ${{ matrix.variant.os }}
103110
name: bindings / ${{ matrix.variant.os }} / ${{ matrix.python-version }} / ${{ matrix.variant.config }}
104111
env:
@@ -199,10 +206,10 @@ jobs:
199206
matrix:
200207
python-version: ['3.13']
201208
variant:
202-
- {os: windows-2022, arch: x64, config: RelWithDebInfo, py-arch: x64}
203-
- {os: ubuntu-24.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
204-
- {os: ubuntu-24.04-arm, arch: arm64, config: RelWithDebInfo, py-arch: arm64}
205-
- {os: macos-15, arch: arm64, config: Release, py-arch: arm64}
209+
- {os: windows-2025, arch: x64, config: RelWithDebInfo, py-arch: x64}
210+
# - {os: ubuntu-24.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
211+
# - {os: ubuntu-24.04-arm, arch: arm64, config: RelWithDebInfo, py-arch: arm64}
212+
# - {os: macos-15, arch: arm64, config: Release, py-arch: arm64}
206213
runs-on: ${{ matrix.variant.os }}
207214
steps:
208215
- uses: actions/download-artifact@v4
@@ -238,14 +245,15 @@ jobs:
238245
matrix:
239246
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
240247
variant:
241-
- {os: windows-2019, arch: x64, config: RelWithDebInfo, py-arch: x64}
242-
- {os: windows-2022, arch: x64, config: RelWithDebInfo, py-arch: x64}
243-
- {os: ubuntu-22.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
244-
- {os: ubuntu-24.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
245-
- {os: ubuntu-24.04-arm, arch: arm64, config: RelWithDebInfo, py-arch: arm64}
246-
- {os: macos-13, arch: x64, config: Release, py-arch: x64}
247-
- {os: macos-14, arch: arm64, config: Release, py-arch: arm64}
248-
- {os: macos-15, arch: arm64, config: Release, py-arch: arm64}
248+
# - {os: windows-2019, arch: x64, config: RelWithDebInfo, py-arch: x64}
249+
# - {os: windows-2022, arch: x64, config: RelWithDebInfo, py-arch: x64}
250+
- {os: windows-2025, arch: x64, config: RelWithDebInfo, py-arch: x64}
251+
# - {os: ubuntu-22.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
252+
# - {os: ubuntu-24.04, arch: x64, config: RelWithDebInfo, py-arch: x64}
253+
# - {os: ubuntu-24.04-arm, arch: arm64, config: RelWithDebInfo, py-arch: arm64}
254+
# - {os: macos-13, arch: x64, config: Release, py-arch: x64}
255+
# - {os: macos-14, arch: arm64, config: Release, py-arch: arm64}
256+
# - {os: macos-15, arch: arm64, config: Release, py-arch: arm64}
249257
runs-on: ubuntu-24.04
250258
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
251259
name: PyPI upload of ${{ matrix.variant.os }}/${{ matrix.variant.arch }}/${{ matrix.variant.config }}/py${{ matrix.python-version }}

0 commit comments

Comments
 (0)