Skip to content

Alright now time for windows #41

Alright now time for windows

Alright now time for windows #41

Workflow file for this run

name: Build Test
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
jobs:
makeLinux:
name: "Make Natives - Linux"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup C++
uses: aminya/setup-cpp@v1
with:
compiler: gcc
- name: Setup Dependencies
run: |
sudo dpkg --add-architecture amd64
sudo dpkg --add-architecture i386
sudo dpkg --add-architecture arm64
sudo dpkg --add-architecture armhf
sudo rm /etc/apt/sources.list
echo "deb [arch=amd64,i386] http://azure.archive.ubuntu.com/ubuntu/ $(lsb_release -sc) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ubuntu.list
echo "deb [arch=amd64,i386] http://azure.archive.ubuntu.com/ubuntu/ $(lsb_release -sc)-updates main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ubuntu-updates.list
echo "deb [arch=amd64,i386] http://azure.archive.ubuntu.com/ubuntu/ $(lsb_release -sc)-security main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ubuntu-security.list
echo "deb [arch=arm64,armhf] http://azure.ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc) main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ubuntu-ports.list
echo "deb [arch=arm64,armhf] http://azure.ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-updates main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ubuntu-ports-updates.list
echo "deb [arch=arm64,armhf] http://azure.ports.ubuntu.com/ubuntu-ports/ $(lsb_release -sc)-security main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ubuntu-ports-security.list
sudo apt-get update -y
sudo apt-get install -y gcc:amd64 g++:amd64 gcc-i686-linux-gnu:amd64 g++-i686-linux-gnu:amd64 gcc-aarch64-linux-gnu:amd64 g++-aarch64-linux-gnu:amd64 gcc-arm-linux-gnueabihf:amd64 g++-arm-linux-gnueabihf:amd64
sudo apt-get install -y libx11-dev:amd64 libxrandr-dev:amd64 libx11-dev:i386 libxrandr-dev:i386 libx11-dev:arm64 libxrandr-dev:arm64 libx11-dev:armhf libxrandr-dev:armhf
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Compile Natives
run: ./gradlew make
- name: Upload Natives
uses: actions/upload-artifact@v4
with:
name: "linux-natives"
path: |
build/natives/*.so
makeWindows:
name: "Make Natives - Windows"
runs-on: windows-latest
permissions:
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup C++
uses: aminya/setup-cpp@v1
with:
compiler: msvc
vcvarsall: true
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Compile Natives
run: ./gradlew make
- name: Upload Natives
uses: actions/upload-artifact@v4
with:
name: "windows-natives"
path: |
build/natives/*.dll
build:
name: "Build"
needs: [ makeLinux, makeWindows ]
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Download Natives
uses: actions/download-artifact@v4
with:
pattern: "*-natives"
path: artifacts/
merge-multiple: true
- name: Extract Natives
run: |
ls artifacts/
mkdir -p build/natives/
cp artifacts/*/* build/natives/
ls build/natives/
- name: Build Artifacts
run: ./gradlew build
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: "builds"
path: |
build/libs/SRD-*-client.jar
build/libs/SRD-*-server.jar
build/libs/SRD-*-manager.jar