Merge pull request #2310 from Margen67/actions

CI: Upgrade to VS2022
This commit is contained in:
Luke Usher 2022-03-04 09:02:15 +00:00 committed by GitHub
commit 1e300d63ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 38 deletions

View File

@ -22,21 +22,15 @@ on:
jobs:
build-windows:
runs-on: ${{ matrix.runs-on }}
name: Build (Windows, ${{ matrix.configuration }}, VS${{ matrix.vsver }}) # runner.os doesn't work here
runs-on: windows-${{ matrix.vsver }}
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
matrix:
configuration: [Release, Debug]
vsver: [VS2019, VS2017] # VS2022
include:
# - vsver: VS2022
# runs-on: windows-2022
- vsver: VS2019
runs-on: windows-2019
- vsver: VS2017
runs-on: windows-2016 # https://github.com/actions/virtual-environments/issues/68#issuecomment-602652021
vsver: [2022, 2019]
steps:
- uses: actions/checkout@v2
with:
@ -51,7 +45,7 @@ jobs:
- uses: actions/upload-artifact@v2
if: matrix.configuration == 'Release'
with:
name: CxbxReloaded-${{ matrix.configuration }}-${{ matrix.vsver }}
name: CxbxReloaded-${{ matrix.configuration }}-VS${{ matrix.vsver }}
path: artifacts/bin
if-no-files-found: error
@ -64,22 +58,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download Artifacts
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Re-zip Artifacts
id: git
- name: Re-zip artifacts
id: zip
run: |
for artifact in artifacts/*; do
7z a $artifact.zip "./$artifact/*"
if [ $(stat -c %s $artifact.zip) -le 1000 ]; then
echo "Error: Archive $artifact.zip too small!"
7z a ${artifact}.zip "./${artifact}/*"
if [ $(stat -c %s ${artifact}.zip) -le 100000 ]; then
echo "Error: Archive ${artifact}.zip too small!"
exit 1
fi
done
echo "::set-output name=tag_name::CI-$(git rev-parse --short HEAD)"
echo "::set-output name=tag_name::CI-${GITHUB_SHA::7}"
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release create ${{ steps.git.outputs.tag_name }} artifacts/*.zip -p --target $GITHUB_SHA --title '${{ steps.git.outputs.tag_name }}'
run: gh release create ${{ steps.zip.outputs.tag_name }} artifacts/*.zip -p --target $GITHUB_SHA --title '${{ steps.zip.outputs.tag_name }}'

View File

@ -14,24 +14,23 @@ Cxbx-Reloaded is an emulator for running Microsoft Xbox (and eventually, Chihiro
### Windows
* [32-bit (x86) Visual C++ 2019 Redistributable](https://aka.ms/vs/16/release/vc_redist.x86.exe)
* [Npcap *(used for network emulation)*](https://nmap.org/npcap/#download)
* Make sure to enable winpcap compatibility mode!
* WinUSB compliant driver *(optional, only needed for USB pass-through of original xbox controllers and the steel battalion controller)*
* Make sure to enable winpcap compatibility mode.
* WinUSB compliant driver
* *Optional, only needed for USB pass-through of original Xbox and Steel Battalion controllers.*
### Wine
**NOTICE: Please use the latest stable release version of Wine. If it does not work for you, then roll back to Wine 5.0.3 which is the last known working version.**
**Please use the latest stable release version of Wine. If it does not work for you, then roll back to Wine 5.0.3 which is the last known working version.**
* Winetricks
* `vcrun2017` or `vcrun2019`
* NOTE: vcrun2019 requires the latest winetricks script!
* `vcrun2019`
* Requires the latest winetricks script.
* `d3dcompiler_47`
* NOTE: May be subject to change over time.
* This may be subject to change.
* Winpcap is built-in, no installation is required.
## Automated Builds
Cxbx-Reloaded doesn't currently have stable builds, but you can obtain pre-release builds from the Releases tab, or the links below:
* **[Release Builds](https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/releases)**
* **Wine users will need to use `CxbxReloaded-Release-VS2017.zip` for it to run correctly.**
* *[Full build history](https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/actions?query=workflow%3A%22GitHub+CI%22)*
## Compatibility
@ -43,15 +42,13 @@ If you would like to submit compatibility reports, please request permission in
Game or software specific issues can be reported in the [compatibility website](https://cxbx-reloaded.co.uk/compatibility).
For emulation issues that are not specific to any single piece of software, a bug report can be submitted at [the Cxbx-Reloaded issue tracker](https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/issues).
Make sure to follow the issue template and that it contains:
<!--Make sure to follow the issue template and that it contains:
* The build tested with, error message displayed (if any)
* **(You can copy and paste any popup messages. However, please keep it clean by paste and trimming down to only the message itself.)**
* **You can copy and paste any popup messages. However, please keep it clean by pasting and trimming down to only the message itself.**
* Screenshots
* (optional unless has any graphic bug for references)
**NOTICE: Failure to follow template will auto close your ticket.**
* Optional unless there are graphic bugs for reference.
**Failure to follow the template will auto close your ticket.**-->
## Additional information
Cxbx-Reloaded has a [wiki](https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/wiki) containing various subjects and background information.
@ -74,8 +71,7 @@ Please contact us before you start working on something, so we can make sure you
### Fetching the code
1. Run the following command in the command line:
`git clone --recurse-submodules https://github.com/Cxbx-Reloaded/Cxbx-Reloaded.git`
<br>`git clone --recurse-submodules https://github.com/Cxbx-Reloaded/Cxbx-Reloaded.git`
* Please note the `--recurse-submodules` parameter. This is required to fetch submodules.
* If Cxbx-Reloaded was checked out without submodules, they can be updated/fetched with the following command:
@ -84,7 +80,7 @@ Please contact us before you start working on something, so we can make sure you
### Compiling
#### Windows
**NOTE:** Don't open `CMakeLists.txt` from Visual Studio, as it won't generate files in the `build` directory.
Don't open `CMakeLists.txt` from Visual Studio, as it won't generate files in the `build` directory.
##### Prerequisites
1. [Visual Studio](https://visualstudio.microsoft.com/downloads/) 2017 or later
@ -99,9 +95,12 @@ Please contact us before you start working on something, so we can make sure you
2. `cd` to the Cxbx-Reloaded directory.
3. Run these commands.
1. `mkdir build & cd build`
2. `cmake .. -G "Visual Studio 16 2019" -A Win32`
* Visual Studio 2019 16.1 or later has CMake 3.14 bundled, and is required for the Visual Studio 2019 generator.
* Use `cmake .. -G "Visual Studio 15 2017" -A Win32` for Visual Studio 2017.
2. `cmake .. -G "generator" -A Win32`
* Generators:
* `Visual Studio 17 2022`
* `Visual Studio 16 2019`
* VS2019 16.1 or later is required and has CMake 3.14 bundled.
* `Visual Studio 15 2017`
4. Open `Cxbx-Reloaded.sln` from the `build` directory.
5. Select the Release configuration, then click Build.
* Debug builds are **significantly slower, and only for developers**.