Merge pull request #51 from Brawmario/windows-build-action
Add parallel windows build to github workflow
This commit is contained in:
+33
-14
@@ -7,37 +7,57 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
|
name: Build libsm64 for ${{ matrix.identifier }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- identifier: linux
|
||||||
|
- identifier: windows
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout project
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.10'
|
||||||
|
|
||||||
- name: Install SDL2 and GLEW
|
- name: (Windows) Set up MinGW
|
||||||
if: runner.os == 'Linux'
|
if: ${{ startsWith(matrix.identifier, 'windows') }}
|
||||||
|
uses: egor-tensin/setup-mingw@v2
|
||||||
|
|
||||||
|
- name: (Windows) Prepare cross compilation
|
||||||
|
if: ${{ startsWith(matrix.identifier, 'windows') }}
|
||||||
|
shell: sh
|
||||||
|
run: |
|
||||||
|
echo "OS=Windows_NT" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: (Linux) Install SDL2 and GLEW
|
||||||
|
if: ${{ startsWith(matrix.identifier, 'linux') }}
|
||||||
run: |
|
run: |
|
||||||
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
|
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
|
||||||
sudo apt-get update -y -qq
|
sudo apt-get update -y -qq
|
||||||
sudo apt-get install libsdl2-dev libglew-dev
|
sudo apt-get install libsdl2-dev libglew-dev
|
||||||
|
|
||||||
- name: Linux - Build Base Binary
|
- name: Build shared library
|
||||||
if: runner.os == 'Linux'
|
|
||||||
run: |
|
run: |
|
||||||
make lib
|
make lib -j`nproc`
|
||||||
make test
|
|
||||||
|
|
||||||
- name: Linux - Upload Build
|
- name: (Linux) Build test executable
|
||||||
|
if: ${{ startsWith(matrix.identifier, 'linux') }}
|
||||||
|
run: |
|
||||||
|
make test -j`nproc`
|
||||||
|
|
||||||
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: runner.os == 'Linux'
|
|
||||||
with:
|
with:
|
||||||
name: libsm64_linux
|
name: libsm64_${{ matrix.identifier }}
|
||||||
path: |
|
path: |
|
||||||
./README.md
|
./README.md
|
||||||
./dist
|
./dist
|
||||||
./build
|
./run-test
|
||||||
|
|
||||||
#Release:
|
#Release:
|
||||||
# name: "Snapshot Release"
|
# name: "Snapshot Release"
|
||||||
@@ -58,4 +78,3 @@ jobs:
|
|||||||
# files: |
|
# files: |
|
||||||
# ./README.md
|
# ./README.md
|
||||||
# ./dist
|
# ./dist
|
||||||
# ./build
|
|
||||||
|
|||||||
Reference in New Issue
Block a user