Linux Riscv BuildTarget #92
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile and deploy snapshot artifacts | |
on: [push, pull_request] # Don't worry, the actual deployment is guarded with an "if" and only done on push to master | |
env: | |
GRADLE_USER_HOME: .gradle | |
jobs: | |
macos: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- run: mkdir -p SDL/build-macosarm64 | |
# No --disable-video for macOS https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c70c727c98b24ad8b44e05285b8785be15062af0 | |
- run: ../configure --host=aarch64-apple-darwin CFLAGS="-arch arm64 -fPIC -mmacosx-version-min=10.7" CPPFLAGS="-arch arm64 -fPIC -mmacosx-version-min=10.7" LDFLAGS="-arch arm64 -mmacosx-version-min=10.7" --disable-audio --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi --disable-joystick-mfi | |
working-directory: SDL/build-macosarm64 | |
- run: make -j | |
working-directory: SDL/build-macosarm64 | |
- run: mkdir -p SDL/build-macos64 | |
# No --disable-video for macOS https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c70c727c98b24ad8b44e05285b8785be15062af0 | |
- run: ../configure CFLAGS="-arch x86_64 -fPIC -mmacosx-version-min=10.7" CPPFLAGS="-arch x86_64 -fPIC -mmacosx-version-min=10.7" LDFLAGS="-arch x86_64 -mmacosx-version-min=10.7" --disable-audio --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi --disable-joystick-mfi | |
working-directory: SDL/build-macos64 | |
- run: make -j | |
working-directory: SDL/build-macos64 | |
- run: sudo make install | |
working-directory: SDL/build-macos64 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew jnigen jnigenBuild | |
- name: Upload macOS natives | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macos-natives | |
path: libs | |
linux: | |
needs: macos | |
runs-on: ubuntu-20.04 | |
env: | |
ORG_GRADLE_PROJECT_GITHUB_USERNAME: "" | |
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: "" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- run: echo "http://ports.ubuntu.com/ubuntu-ports" | sudo tee -a /etc/apt/apt-mirrors.txt | |
- name: Add extra platform architectures | |
run: sudo dpkg --add-architecture i386; sudo dpkg --add-architecture armhf; sudo dpkg --add-architecture arm64 | |
- run: sudo apt-get update || true | |
- name: Install Windows compilers | |
run: sudo apt-get -yq install g++-mingw-w64-i686 g++-mingw-w64-x86-64 | |
- name: Install Linux x86 compilers/libraries | |
run: sudo apt-get -yq install gcc-multilib g++-multilib linux-libc-dev:i386 | |
- name: Install Linux arm32 compilers/libraries | |
run: sudo apt-get -yq install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf | |
- name: Install Linux arm64 compilers/libraries | |
run: sudo apt-get -yq install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu | |
- name: Install Linux riscv64 compilers/libraries | |
run: sudo apt-get -yq install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu | |
- name: Download macOS natives | |
uses: actions/download-artifact@v3 | |
with: | |
name: macos-natives | |
path: libs | |
- run: find -type f -name "*.h" -exec sed -i 's/extern DECLSPEC//' {} \; | |
working-directory: SDL | |
- run: sed -i 's/#define SDL_DYNAMIC_API 1/#define SDL_DYNAMIC_API 0/' SDL/src/dynapi/SDL_dynapi.h | |
- run: mkdir -p SDL/build-linux64 | |
- run: ../configure CFLAGS="-fPIC" CPPFLAGS="-fPIC" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi | |
working-directory: SDL/build-linux64 | |
- run: make -j | |
working-directory: SDL/build-linux64 | |
- run: mkdir -p SDL/build-linux32 | |
- run: ../configure CFLAGS="-fPIC -m32" CPPFLAGS="-fPIC -m32" LDFLAGS="-m32" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi | |
working-directory: SDL/build-linux32 | |
- run: make -j | |
working-directory: SDL/build-linux32 | |
- run: mkdir -p SDL/build-linuxarm32 | |
- run: ../configure --host=arm-linux-gnueabihf CFLAGS="-fPIC" CPPFLAGS="-fPIC" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi | |
working-directory: SDL/build-linuxarm32 | |
- run: make -j | |
working-directory: SDL/build-linuxarm32 | |
- run: mkdir -p SDL/build-linuxarm64 | |
- run: ../configure --host=aarch64-linux-gnu CFLAGS="-fPIC" CPPFLAGS="-fPIC" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi | |
working-directory: SDL/build-linuxarm64 | |
- run: make -j | |
working-directory: SDL/build-linuxarm64 | |
- run: mkdir -p SDL/build-linuxriscv64 | |
- run: ../configure --host=riscv64-linux-gnu CFLAGS="-fPIC" CPPFLAGS="-fPIC" --disable-audio --disable-video --disable-video-vulkan --disable-render --disable-filesystem --disable-threads --disable-directx --disable-mmx --disable-3dnow --disable-sse --disable-sse2 --disable-sse3 --disable-cpuinfo --disable-sensor --enable-hidapi | |
working-directory: SDL/build-linuxriscv64 | |
- run: make -j | |
working-directory: SDL/build-linuxriscv64 | |
- run: mkdir -p SDL/build-windows32 | |
- run: ../configure --host=i686-w64-mingw32 --disable-audio --disable-render --disable-power --disable-filesystem --disable-hidapi | |
working-directory: SDL/build-windows32 | |
- run: make -j | |
working-directory: SDL/build-windows32 | |
- run: mkdir -p SDL/build-windows64 | |
- run: ../configure --host=x86_64-w64-mingw32 --disable-audio --disable-render --disable-power --disable-filesystem --disable-hidapi | |
working-directory: SDL/build-windows64 | |
- run: make -j | |
working-directory: SDL/build-windows64 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew jnigen jnigenBuild jnigenJarNativesDesktop | |
- name: Upload all output libs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: output-libs | |
path: build/libs/ | |
- name: Snapshot build | |
run: | |
./gradlew build | |
- name: Snapshot deploy | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'libgdx' | |
env: | |
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
run: | |
./gradlew publish |