ci: don't use conan for ci

This commit is contained in:
Anonymous Maarten
2024-08-16 14:39:15 +02:00
parent e40a19be72
commit a85292e799
5 changed files with 77 additions and 244 deletions

View File

@@ -1,57 +0,0 @@
name: Conan
on:
pull_request:
push:
release:
types: published
jobs:
build-cmake:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
platform: ['null', 'gl3', 'd3d9']
gl3_gfxlib: ['glfw', 'sdl2']
exclude:
- os: ubuntu-latest
platform: d3d9
- os: macos-latest
platform: d3d9
- platform: 'null'
gl3_gfxlib: sdl2
- platform: d3d9
gl3_gfxlib: sdl2
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: "Setup conan"
run: |
python -m pip install conan
conan config init
- name: "Create host profile"
shell: bash
run: |
cp ~/.conan/profiles/default host_profile
- name: "Download/build dependencies (conan install)"
run: |
conan install ${{ github.workspace }} librw/master@ -if build -o librw:platform=${{ matrix.platform }} -o librw:gl3_gfxlib=${{ matrix.gl3_gfxlib }} --build missing -pr:h ./host_profile -pr:b default
env:
CONAN_SYSREQUIRES_MODE: enabled
- name: "Build librw (conan build)"
run: |
conan build ${{ github.workspace }} -if build -bf build -pf package
- name: "Package librw (conan package)"
run: |
conan package ${{ github.workspace }} -if build -bf build -pf package
- name: "Create binary package (cpack)"
working-directory: ./build
run: |
cpack
- name: "Archive binary package (github artifacts)"
uses: actions/upload-artifact@v2
with:
name: "${{ matrix.os }}-${{ matrix.platform }}"
path: build/*.tar.xz
if-no-files-found: error

View File

@@ -1,29 +0,0 @@
name: Playstation 2 (by ps2dev)
on:
pull_request:
push:
release:
types: published
jobs:
build-playstation-2:
runs-on: ubuntu-latest
container: ps2dev/ps2dev
steps:
- uses: actions/checkout@v2
- name: "Install dependencies"
run: |
apk add build-base cmake
- name: "Build files"
run: |
cmake -S. -Bbuild -DLIBRW_INSTALL=ON -DLIBRW_PLATFORM=PS2 -DCMAKE_TOOLCHAIN_FILE=cmake/ps2/cmaketoolchain/toolchain_ps2_ee.cmake
cmake --build build --parallel
- name: "Create binary package (cpack)"
working-directory: ./build
run: |
cpack
- name: "Archive binary package (github artifacts)"
uses: actions/upload-artifact@v2
with:
name: "ps2"
path: build/*.tar.xz
if-no-files-found: error

View File

@@ -1,26 +0,0 @@
name: Nintendo Switch (by devkitPro)
on:
pull_request:
push:
release:
types: published
jobs:
build-nintendo-switch:
runs-on: ubuntu-latest
container: devkitpro/devkita64:latest
steps:
- uses: actions/checkout@v2
- name: "Build files"
run: |
/opt/devkitpro/portlibs/switch/bin/aarch64-none-elf-cmake -S. -Bbuild -DLIBRW_PLATFORM=GL3 -DLIBRW_GL3_GFXLIB=GLFW -DLIBRW_INSTALL=True
cmake --build build --parallel
- name: "Create binary package (cpack)"
working-directory: ./build
run: |
cpack
- name: "Archive binary package (github artifacts)"
uses: actions/upload-artifact@v2
with:
name: "switch-gl3"
path: build/*.tar.xz
if-no-files-found: error

77
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,77 @@
name: Build
on:
pull_request:
push:
release:
types: published
jobs:
build-cmake:
name: ${{ matrix.case.name }}
runs-on: ${{ matrix.case.os }}
container: ${{ matrix.case.container }}
strategy:
fail-fast: false
matrix:
case:
- { name: 'Windows (DirectX 9)', os: 'windows-latest', platform: 'D3D9' }
- { name: 'Windows (GL3, glfw)', os: 'windows-latest', platform: 'GL3', gl3_gfxlib: 'GLFW' }
- { name: 'Windows (GL3, SDL2)', os: 'windows-latest', platform: 'GL3', gl3_gfxlib: 'SDL2' }
- { name: 'Windows (null)', os: 'windows-latest', platform: 'NULL' }
- { name: 'macOS (GL3, glfw)', os: 'macos-latest', platform: 'GL3', gl3_gfxlib: 'GLFW' }
- { name: 'macOS (GL3, SDL2)', os: 'macos-latest', platform: 'GL3', gl3_gfxlib: 'SDL2' }
- { name: 'macOS (null)', os: 'macos-latest', platform: 'NULL' }
- { name: 'Ubuntu (GL3, glfw)', os: 'ubuntu-latest', platform: 'GL3', gl3_gfxlib: 'GLFW' }
- { name: 'Ubuntu (GL3, SDL2)', os: 'ubuntu-latest', platform: 'GL3', gl3_gfxlib: 'SDL2' }
- { name: 'Ubuntu (null)', os: 'ubuntu-latest', platform: 'NULL' }
- { name: 'PlayStation 2', os: 'ubuntu-latest', platform: 'PS2', ps2: true, container: 'ps2dev/ps2dev:latest', cmake-toolchain-file: 'cmake/ps2/cmaketoolchain/toolchain_ps2_ee.cmake' }
- { name: 'Nintendo Switch', os: 'ubuntu-latest', platform: 'GL3', gl3_gfxlib: 'GLFW', glfw-nobuild: true, container: 'devkitpro/devkita64:latest', cmake-toolchain-file: '/opt/devkitpro/cmake/Switch.cmake' }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: 'Install PS2 dependencies'
if: ${{ matrix.case.ps2 }}
run: |
apk add cmake gmp mpc1 mpfr4 make pkgconf git
- name: 'Setup SDL2'
if: ${{ matrix.case.gl3_gfxlib == 'SDL2' }}
uses: libsdl-org/setup-sdl@main
with:
version: 2-latest
install-linux-dependencies: true
cmake-toolchain-file: ${{ matrix.case.cmake-toolchain-file }}
- name: 'Setup GLFW'
if: ${{ matrix.case.gl3_gfxlib == 'GLFW' && !matrix.case.glfw-nobuild }}
shell: sh
run: |
${{ (runner.os == 'Linux' && 'sudo apt-get update -y && sudo apt-get install -y libwayland-dev libxkbcommon-dev xorg-dev') || '' }}
git clone "https://github.com/glfw/glfw.git" glfw-source --depth 1
cmake -S glfw-source -B glfw-build -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_INSTALL=ON -DCMAKE_INSTALL_PREFIX=glfw-prefix -DCMAKE_TOOLCHAIN_FILE="${{ matrix.case.cmake-toolchain-file }}" -DCMAKE_BUILD_TYPE=Release
cmake --build glfw-build --config Release
cmake --install glfw-build --config Release
echo "glfw3_ROOT=${{ github.workspace}}/glfw-prefix" >${GITHUB_ENV}
- name: 'Configure (CMake)'
shell: sh
run: |
cmake -S . -B build \
-DLIBRW_PLATFORM=${{ matrix.case.platform }} \
-DLIBRW_GL3_GFXLIB=${{ matrix.case.gl3_gfxlib }} \
-DCMAKE_TOOLCHAIN_FILE=${{ matrix.case.cmake-toolchain-file }} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW
- name: 'Build (CMake)'
run: |
cmake --build build --config Release --verbose
- name: 'Create binary package (CPack)'
run: |
cd build
cpack . -C Release
- name: 'Archive binary package (GitHub artifacts)'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.case.os }}-${{ matrix.case.platform }}${{ (matrix.case.gl3_gfxlib != '' && format('-{0}', matrix.case.gl3_gfxlib)) || '' }}
path: build/*.tar.xz
if-no-files-found: error