Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Travis to a GitHub Workflow
- Upgrade from gmake to gmake2 (requires premake 5.0 alpha 12) - Change instructions to indicate VS2019 instead of 2015 - Delete .travis.yml configuration - Add a GitHub Workflow that checks out & runs tests - Update README badge ci.yml has a few improvements from the old Travis flow: - Targets Windows and MacOS in addition to Linux - Fetches libsodium from apt for faster builds - Runs on pull requests - Runs debug & release in parallel
- Loading branch information
Showing
5 changed files
with
81 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_and_test: | ||
name: Build & test | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
configuration: [release, debug] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Setup premake | ||
uses: abel0b/setup-premake@v1 | ||
|
||
## Linux-specific build setup | ||
# Install libsodium from apt | ||
- name: Setup (Linux) | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get install libsodium-dev | ||
## MacOS-specific build setup | ||
# Install libsodium from homebrew | ||
- name: Setup (MacOS) | ||
if: runner.os == 'MacOS' | ||
run: brew install libsodium | ||
|
||
## Linux & MacOS-specific build steps | ||
# Build with premake + make | ||
- name: Build (gmake2) | ||
if: runner.os != 'Windows' | ||
run: | | ||
premake5 gmake2 | ||
make clean | ||
make all config=${{ matrix.configuration }}_x64 | ||
# Run the tests with sh syntax | ||
- name: Test (gmake2) | ||
if: runner.os != 'Windows' | ||
run: ./bin/test | ||
|
||
## Windows-specific build steps | ||
# Set up PATH variables to point to MSBuild from at least VS 16.1 (2019) | ||
- name: Setup (vs2019) | ||
if: runner.os == 'Windows' | ||
uses: microsoft/setup-msbuild@v1.1 | ||
with: | ||
vs-version: '16.1.0' | ||
|
||
# Build with premake + msbuild | ||
- name: Build (vs2019) | ||
if: runner.os == 'Windows' | ||
run: | | ||
premake5 vs2019 | ||
msbuild netcode.sln -nologo -m -t:Clean -p:Configuration=${{ matrix.configuration }} | ||
msbuild netcode.sln -nologo -m -p:Configuration=${{ matrix.configuration }} | ||
# Run the tests with Powershell syntax | ||
- name: Test (vs2019) | ||
if: runner.os == 'Windows' | ||
run: "& ./bin/x64/${{ matrix.configuration }}/test.exe" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters