try x86 #128
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: Build | |
# Controls when the workflow will run | |
on: | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
RAYLIB_VERSION: 5.5.0-2 | |
jobs: | |
build-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' # See 'Supported distributions' for available options | |
java-version: '8' | |
- name: Build raylib | |
run: | | |
sudo apt update | |
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev | |
cd raylib | |
mkdir build | |
cd build | |
cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
make -j2 | |
sudo make install | |
- name: Build jaylib | |
env: | |
RAYLIB_PLATFORM: linux-x86_64 | |
run: | | |
./build-java.sh | |
./build-native.sh | |
./build-docs.sh | |
- name: Upload jar | |
uses: actions/[email protected] | |
with: | |
name: jar | |
path: ./*.jar | |
build-linux-x86: | |
runs-on: ubuntu-20.04 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' # See 'Supported distributions' for available options | |
java-version: '8' | |
- name: Build raylib | |
run: | | |
sudo apt update | |
sudo apt install gcc-multilib | |
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev | |
cd raylib | |
mkdir build | |
cd build | |
cmake -DCMAKE_C_FLAGS="-m32" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
make -j2 | |
sudo make install | |
ldd /usr/local/lib/libraylib.a | |
- name: Build jaylib | |
env: | |
RAYLIB_PLATFORM: linux-x86 | |
run: | | |
./build-java.sh | |
./build-native.sh | |
./build-docs.sh | |
- name: Upload jar | |
uses: actions/[email protected] | |
with: | |
name: jar | |
path: ./*.jar | |
# build-linux-arm: | |
# runs-on: rpi | |
# | |
# steps: | |
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
# - uses: actions/checkout@v2 | |
# with: | |
# submodules: recursive | |
# | |
# | |
# - name: Build raylib | |
# run: | | |
# cd raylib | |
# mkdir build | |
# cd build | |
# cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND .. | |
# make -j2 | |
# make install | |
# | |
# - name: Build jaylib | |
# env: | |
# RAYLIB_PLATFORM: linux-armhf | |
# run: | | |
# ./build-java.sh | |
# ./build-native.sh | |
# | |
# - name: Upload jar | |
# uses: actions/[email protected] | |
# with: | |
# name: jar | |
# path: ./*.jar | |
build-mac: | |
runs-on: macos-12 | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.14 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' # See 'Supported distributions' for available options | |
java-version: '8' | |
# build raylib for arm64 and x86_64 as well | |
- name: Build raylib | |
run: | | |
cd raylib | |
mkdir build | |
cd build | |
cmake -DBUILD_EXAMPLES=OFF -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
make -j2 | |
sudo make install | |
- name: Build jaylib | |
env: | |
RAYLIB_PLATFORM: macosx-x86_64 | |
run: | | |
./build-java.sh | |
./build-native.sh | |
- name: Upload jar | |
uses: actions/[email protected] | |
with: | |
name: jar | |
path: ./*macosx-x86_64*.jar | |
build-windows: | |
runs-on: windows-2019 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' # See 'Supported distributions' for available options | |
java-version: '8' | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Build raylib | |
run: | | |
cd raylib | |
mkdir build | |
cd build | |
cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
msbuild raylib.sln /target:raylib /property:Configuration=Release | |
copy raylib\Release\raylib.lib ..\.. | |
cd ..\.. | |
shell: cmd | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Build jaylib | |
env: | |
RAYLIB_PLATFORM: windows-x86_64 | |
run: | | |
build-windows.bat | |
shell: cmd | |
- name: Upload jar | |
uses: actions/[email protected] | |
with: | |
name: jar | |
path: ./*.jar | |
build-windows32: | |
runs-on: windows-2019 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' # See 'Supported distributions' for available options | |
java-version: '8' | |
architecture: 'x86' | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
with: | |
msbuild-architecture: x86 | |
- name: Build raylib | |
run: | | |
cd raylib | |
mkdir build | |
cd build | |
cmake -A Win32 -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DOPENGL_VERSION=2.1 -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
msbuild raylib.sln /target:raylib /property:Configuration=Release | |
copy raylib\Release\raylib.lib ..\.. | |
cd ..\.. | |
shell: cmd | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x86 | |
- name: Build jaylib | |
env: | |
RAYLIB_PLATFORM: windows-x86 | |
run: | | |
build-windows.bat | |
shell: cmd | |
- name: Upload jar | |
uses: actions/[email protected] | |
with: | |
name: jar | |
path: ./*.jar |