Browse Source

add Linux_x86, Linux_x86_64, Linux_SDL1 to GH Actions

pull/1853/head
Trihedraf 5 years ago committed by Anders Jenbo
parent
commit
1bf85a1f37
  1. 46
      .github/workflows/Linux_x86.yml
  2. 46
      .github/workflows/Linux_x86_64.yml
  3. 40
      .github/workflows/Linux_x86_64_SDL1.yml
  4. 12
      .github/workflows/MacOSX.yml

46
.github/workflows/Linux_x86.yml

@ -0,0 +1,46 @@
name: Linux_x86
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create Build Environment
run: sudo dpkg --add-architecture i386 && sudo apt-get update -y && sudo apt-get install -y cmake file g++-multilib git libfmt-dev:i386 libsdl2-dev:i386 libsdl2-ttf-dev:i386 libsodium-dev:i386 rpm wget
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}
run: cmake -S. -Bbuild -DNIGHTLY_BUILD=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_TOOLCHAIN_FILE=../CMake/32bit.cmake
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: cmake --build build -j $(nproc) --target package
- name: Upload-Executable
uses: actions/upload-artifact@v2
with:
name: devilutionx_linux_x86
path: build/devilutionx
- name: Package
run: Packaging/nix/LinuxReleasePackaging.sh && Packaging/nix/AppImage.sh
- name: Upload-Package
uses: actions/upload-artifact@v2
with:
name: devilutionx_linux_x86.tar.xz
path: devilutionx.tar.xz
- name: Upload-AppImage
uses: actions/upload-artifact@v2
with:
name: devilutionx_linux_x86.appimage
path: devilutionx.appimage

46
.github/workflows/Linux_x86_64.yml

@ -0,0 +1,46 @@
name: Linux_x86_64
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create Build Environment
run: sudo apt-get install -y cmake file g++ git libfmt-dev libsdl2-dev libsdl2-ttf-dev libsodium-dev rpm wget
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}
run: cmake -S. -Bbuild .. -DNIGHTLY_BUILD=ON -DCMAKE_INSTALL_PREFIX=/usr
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: cmake --build build -j $(nproc) --target package
- name: Upload-Executable
uses: actions/upload-artifact@v2
with:
name: devilutionx_linux_x86_64
path: build/devilutionx
- name: Package
run: Packaging/nix/LinuxReleasePackaging.sh && Packaging/nix/AppImage.sh
- name: Upload-Package
uses: actions/upload-artifact@v2
with:
name: devilutionx_linux_x86_64.tar.xz
path: devilutionx.tar.xz
- name: Upload-AppImage
uses: actions/upload-artifact@v2
with:
name: devilutionx_linux_x86_64.appimage
path: devilutionx.appimage

40
.github/workflows/Linux_x86_64_SDL1.yml

@ -0,0 +1,40 @@
name: Linux_x86_64_SDL1
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create Build Environment
run: sudo apt-get install -y cmake file g++ git libfmt-dev libsdl-dev libsdl-ttf2.0-dev libsodium-dev rpm
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}
run: cmake -S. -Bbuild .. -DNIGHTLY_BUILD=ON -DUSE_SDL1=ON
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: cmake --build build -j $(nproc) --target package
- name: Upload-Executable
uses: actions/upload-artifact@v2
with:
name: devilutionx_linux_x86_64_SDL1
path: build/devilutionx
- name: Package
run: Packaging/nix/LinuxReleasePackaging.sh
- name: Upload-Package
uses: actions/upload-artifact@v2
with:
name: devilutionx_linux_x86_64_SDL1.tar.xz
path: devilutionx.tar.xz

12
.github/workflows/cmake.yml → .github/workflows/MacOSX.yml

@ -1,4 +1,4 @@
name: CMake
name: MacOSX
# When creating a new workflow in GitHub’s action builder the default trigger is the push event. We want to extend this to push and pull request events.
on: [push, pull_request]
@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create Build Environment
run: brew bundle install
@ -28,8 +28,8 @@ jobs:
# access regardless of the host operating system
shell: bash
working-directory: ${{github.workspace}}/build
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
run: cmake ..
@ -37,8 +37,8 @@ jobs:
working-directory: ${{github.workspace}}/build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . -j 2 --target package
run: cmake --build . -j $(nproc) --target package
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Loading…
Cancel
Save