Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions build with MSVC #468

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/win-msvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Windows binary with MSVC

on:
push:
branches: [ "*" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: git mingw-w64-ucrt-x86_64-gcc

- name: Configure
shell: msys2 {0}
run: cd bochs && ./.conf.win64-vcpp

- name: Relocate project files
shell: msys2 {0}
run: cd bochs && mv build/win32/vs2019-workspace/vs2019 vs2019

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Build
run: msbuild bochs\vs2019\bochs.sln /t:Build /p:Configuration=Release /p:Platform=x64

- name: Get short git commit SHA
shell: msys2 {0}
run: echo "SHORT_GITHUB_SHA=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV

- name: Upload main binary artifact
uses: actions/upload-artifact@v4
with:
name: bochs-${{ env.SHORT_GITHUB_SHA }}-msvc.exe
path: bochs/obj-release/bochs.exe