Update build.yml
This commit is contained in:
parent
cd41e019fb
commit
a33012a6bc
1 changed files with 19 additions and 78 deletions
97
.github/workflows/build.yml
vendored
97
.github/workflows/build.yml
vendored
|
|
@ -18,30 +18,11 @@ jobs:
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: setup dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install \
|
|
||||||
libasound2-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libxi-dev \
|
|
||||||
libgl1-mesa-dev \
|
|
||||||
libglu1-mesa-dev \
|
|
||||||
libxcursor-dev \
|
|
||||||
libxinerama-dev
|
|
||||||
|
|
||||||
- name: setup dotnet
|
- name: setup dotnet
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: 6.0.x
|
dotnet-version: 6.0.x
|
||||||
|
|
||||||
- name: build and run tests
|
|
||||||
run: dotnet test Raylib-cs.Tests -c Release
|
|
||||||
|
|
||||||
- name: build examples desktop
|
|
||||||
run: dotnet build Examples -c Release
|
|
||||||
|
|
||||||
- name: check raylib version
|
- name: check raylib version
|
||||||
id: version
|
id: version
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
@ -66,25 +47,17 @@ jobs:
|
||||||
libxcursor-dev \
|
libxcursor-dev \
|
||||||
libxinerama-dev
|
libxinerama-dev
|
||||||
|
|
||||||
- name: build raylib
|
- name: build projects
|
||||||
env:
|
run: dotnet build -c Release
|
||||||
version: ${{ needs.build.outputs.version }}
|
|
||||||
run: |
|
- name: run tests
|
||||||
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/refs/tags/${version}.zip
|
run: dotnet test Raylib-cs.Tests -c Release
|
||||||
unzip -qq raylib.zip
|
|
||||||
cmake -S raylib-${version} \
|
|
||||||
-B build \
|
|
||||||
-D CMAKE_BUILD_TYPE=Release \
|
|
||||||
-D BUILD_SHARED_LIBS=ON \
|
|
||||||
-D BUILD_EXAMPLES=OFF \
|
|
||||||
-D CMAKE_C_FLAGS="${{ matrix.cflags }}"
|
|
||||||
cmake --build build --config Release
|
|
||||||
|
|
||||||
- name: upload build
|
- name: upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: linux-x64
|
name: linux-x64
|
||||||
path: build/raylib/libraylib.so
|
path: Raylib-cs.Native/obj/Release/net6.0/native/raylib/libraylib.so
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-osx:
|
build-osx:
|
||||||
|
|
@ -99,25 +72,17 @@ jobs:
|
||||||
- name: x64
|
- name: x64
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
steps:
|
steps:
|
||||||
- name: build raylib
|
- name: build projects
|
||||||
env:
|
run: dotnet build -c Release
|
||||||
version: ${{ needs.build.outputs.version }}
|
|
||||||
run: |
|
- name: run tests
|
||||||
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/refs/tags/${version}.zip
|
run: dotnet test Raylib-cs.Tests -c Release
|
||||||
unzip -qq raylib.zip
|
|
||||||
cmake -S raylib-${version} \
|
|
||||||
-B build \
|
|
||||||
-D CMAKE_BUILD_TYPE=Release \
|
|
||||||
-D CMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
|
|
||||||
-D BUILD_SHARED_LIBS=ON \
|
|
||||||
-D BUILD_EXAMPLES=OFF
|
|
||||||
cmake --build build --config Release
|
|
||||||
|
|
||||||
- name: upload build
|
- name: upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: osx-${{ matrix.name }}
|
name: osx-${{ matrix.name }}
|
||||||
path: build/raylib/libraylib.dylib
|
path: Raylib-cs.Native/obj/Release/net6.0/native/raylib/libraylib.dylib
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
|
|
@ -132,33 +97,22 @@ jobs:
|
||||||
- name: x64
|
- name: x64
|
||||||
arch: x64
|
arch: x64
|
||||||
steps:
|
steps:
|
||||||
- name: build ${{ matrix.arch }}
|
- name: build projects
|
||||||
shell: bash
|
run: dotnet build -c Release
|
||||||
env:
|
|
||||||
version: ${{ needs.build.outputs.version }}
|
- name: run tests
|
||||||
run: |
|
run: dotnet test Raylib-cs.Tests -c Release
|
||||||
curl -Lso raylib.zip https://github.com/raysan5/raylib/archive/refs/tags/${version}.zip
|
|
||||||
unzip -qq raylib.zip
|
|
||||||
cmake -S raylib-${version} \
|
|
||||||
-A ${{ matrix.arch }} \
|
|
||||||
-B build \
|
|
||||||
-D CMAKE_BUILD_TYPE=Release \
|
|
||||||
-D BUILD_SHARED_LIBS=ON \
|
|
||||||
-D BUILD_EXAMPLES=OFF \
|
|
||||||
-D CMAKE_C_FLAGS="${{ matrix.cflags }}"
|
|
||||||
cmake --build build --config Release
|
|
||||||
|
|
||||||
- name: upload build
|
- name: upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: win-${{ matrix.name }}
|
name: win-${{ matrix.name }}
|
||||||
path: build/raylib/Release/raylib.dll
|
path: Raylib-cs.Native/obj/Release/net6.0/native/raylib/raylib.dll
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
publish:
|
build-publish:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs:
|
needs:
|
||||||
- build
|
|
||||||
- build-linux
|
- build-linux
|
||||||
- build-osx
|
- build-osx
|
||||||
- build-windows
|
- build-windows
|
||||||
|
|
@ -166,19 +120,6 @@ jobs:
|
||||||
- name: checkout repository
|
- name: checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: setup dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install \
|
|
||||||
libasound2-dev \
|
|
||||||
libx11-dev \
|
|
||||||
libxrandr-dev \
|
|
||||||
libxi-dev \
|
|
||||||
libgl1-mesa-dev \
|
|
||||||
libglu1-mesa-dev \
|
|
||||||
libxcursor-dev \
|
|
||||||
libxinerama-dev
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: linux-x64
|
name: linux-x64
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue