Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lower GLIBC requirements by using building linux natives on ubuntu 18.04 docker #23

Merged
merged 4 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .github/workflows/pushaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,38 @@ jobs:
linux:
needs: macos
runs-on: ubuntu-20.04
container: ubuntu:18.04
env:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ""
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ""
steps:
- uses: actions/checkout@v4
- name: Install dependencies into minimal dockerfile
run: |
# ubuntu dockerfile is very minimal (only 122 packages are installed)
# need to install updated git (from official git ppa)
apt update
apt install -y software-properties-common
add-apt-repository ppa:git-core/ppa -y
# install dependencies expected by other steps
apt update
apt install -y git \
curl \
ca-certificates \
wget \
bzip2 \
zip \
unzip \
xz-utils \
openjdk-11-jdk-headless \
maven \
build-essential \
ant sudo locales
# set Locale to en_US.UTF-8 (avoids hang during compilation)
locale-gen en_US.UTF-8
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "LANGUAGE=en_US.UTF-8" >> $GITHUB_ENV
echo "LC_ALL=en_US.UTF-8" >> $GITHUB_ENV
- uses: actions/checkout@v3

This comment was marked as resolved.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, unfortunately nodejs 20 doesn't support bionic (glibc 2.17) so checkout v3 was necessary.

Unfortunately supporting these older systems gets more difficult by the day.

Personally I have given up on that for my own projects but I leave PRs like this open incase upstream repositories want to continue playing that game.

with:
submodules: 'recursive'

Expand All @@ -67,10 +94,13 @@ jobs:
- name: Setup Gradle
uses: gradle/[email protected]

- run: echo "http://ports.ubuntu.com/ubuntu-ports" | sudo tee -a /etc/apt/apt-mirrors.txt
- run: sudo sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list
- run: grep "ubuntu.com/ubuntu" /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's/amd64,i386/armhf,arm64/' /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's#http://.*/ubuntu#http://ports.ubuntu.com/ubuntu-ports#' /etc/apt/sources.list.d/ports.list
theofficialgman marked this conversation as resolved.
Show resolved Hide resolved
- 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
- run: sudo apt-get update
- 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
Expand Down
36 changes: 33 additions & 3 deletions .github/workflows/releaseaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,38 @@ jobs:
linux:
needs: macos
runs-on: ubuntu-20.04
container: ubuntu:18.04
env:
ORG_GRADLE_PROJECT_GITHUB_USERNAME: ""
ORG_GRADLE_PROJECT_GITHUB_API_TOKEN: ""
steps:
- uses: actions/checkout@v4
- name: Install dependencies into minimal dockerfile
run: |
# ubuntu dockerfile is very minimal (only 122 packages are installed)
# need to install updated git (from official git ppa)
apt update
apt install -y software-properties-common
add-apt-repository ppa:git-core/ppa -y
# install dependencies expected by other steps
apt update
apt install -y git \
curl \
ca-certificates \
wget \
bzip2 \
zip \
unzip \
xz-utils \
openjdk-11-jdk-headless \
maven \
build-essential \
ant sudo locales
# set Locale to en_US.UTF-8 (avoids hang during compilation)
locale-gen en_US.UTF-8
echo "LANG=en_US.UTF-8" >> $GITHUB_ENV
echo "LANGUAGE=en_US.UTF-8" >> $GITHUB_ENV
echo "LC_ALL=en_US.UTF-8" >> $GITHUB_ENV
- uses: actions/checkout@v3
with:
submodules: 'recursive'

Expand All @@ -70,10 +97,13 @@ jobs:
- name: Setup Gradle
uses: gradle/[email protected]

- run: echo "http://ports.ubuntu.com/ubuntu-ports" | sudo tee -a /etc/apt/apt-mirrors.txt
- run: sudo sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list
- run: grep "ubuntu.com/ubuntu" /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's/amd64,i386/armhf,arm64/' /etc/apt/sources.list.d/ports.list
- run: sudo sed -i 's#http://.*/ubuntu#http://ports.ubuntu.com/ubuntu-ports#' /etc/apt/sources.list.d/ports.list
- 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
- run: sudo apt-get update
- 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
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,32 +119,32 @@ jnigen {
add(Windows, x32) {
cFlags += getSdl2CFlags('./SDL/build-windows32/')
cppFlags += getSdl2CFlags('./SDL/build-windows32/')
libraries += getSdl2StaticLibs('./SDL/build-windows32/').replaceAll("[a-zA-Z0-9\\.\\-/]+libSDL2.a", file("SDL/build-windows32/build/.libs/libSDL2.a").absolutePath).replace("-lSDL2main", file("SDL/build-windows32/build/.libs/libSDL2main.a").absolutePath)
libraries += getSdl2StaticLibs('./SDL/build-windows32/').replaceAll("[a-zA-Z0-9_\\.\\-/]+libSDL2.a", file("SDL/build-windows32/build/.libs/libSDL2.a").absolutePath).replace("-lSDL2main", file("SDL/build-windows32/build/.libs/libSDL2main.a").absolutePath)
}
add(Windows, x64) {
cFlags += getSdl2CFlags('./SDL/build-windows64/')
cppFlags += getSdl2CFlags('./SDL/build-windows64/')
libraries += getSdl2StaticLibs('./SDL/build-windows64/').replaceAll("[a-zA-Z0-9\\.\\-/]+libSDL2.a", file("SDL/build-windows64/build/.libs/libSDL2.a").absolutePath).replace("-lSDL2main", file("SDL/build-windows64/build/.libs/libSDL2main.a").absolutePath)
libraries += getSdl2StaticLibs('./SDL/build-windows64/').replaceAll("[a-zA-Z0-9_\\.\\-/]+libSDL2.a", file("SDL/build-windows64/build/.libs/libSDL2.a").absolutePath).replace("-lSDL2main", file("SDL/build-windows64/build/.libs/libSDL2main.a").absolutePath)
}
add(Linux, x32) {
cFlags += getSdl2CFlags('./SDL/build-linux32/')
cppFlags += getSdl2CFlags('./SDL/build-linux32/')
libraries += getSdl2StaticLibs('./SDL/build-linux32/').replaceAll("[a-zA-Z0-9\\.\\-/]+libSDL2.a", file("SDL/build-linux32/build/.libs/libSDL2.a").absolutePath)
libraries += getSdl2StaticLibs('./SDL/build-linux32/').replaceAll("[a-zA-Z0-9_\\.\\-/]+libSDL2.a", file("SDL/build-linux32/build/.libs/libSDL2.a").absolutePath)
}
add(Linux, x64) {
cFlags += getSdl2CFlags('./SDL/build-linux64/')
cppFlags += getSdl2CFlags('./SDL/build-linux64/')
libraries += getSdl2StaticLibs('./SDL/build-linux64/').replaceAll("[a-zA-Z0-9\\.\\-/]+libSDL2.a", file("SDL/build-linux64/build/.libs/libSDL2.a").absolutePath)
libraries += getSdl2StaticLibs('./SDL/build-linux64/').replaceAll("[a-zA-Z0-9_\\.\\-/]+libSDL2.a", file("SDL/build-linux64/build/.libs/libSDL2.a").absolutePath)
}
add(Linux, x32, ARM) {
cFlags += getSdl2CFlags('./SDL/build-linuxarm32/')
cppFlags += getSdl2CFlags('./SDL/build-linuxarm32/')
libraries += getSdl2StaticLibs('./SDL/build-linuxarm32/').replaceAll("[a-zA-Z0-9\\.\\-/]+libSDL2.a", file("SDL/build-linuxarm32/build/.libs/libSDL2.a").absolutePath)
libraries += getSdl2StaticLibs('./SDL/build-linuxarm32/').replaceAll("[a-zA-Z0-9_\\.\\-/]+libSDL2.a", file("SDL/build-linuxarm32/build/.libs/libSDL2.a").absolutePath)
}
add(Linux, x64, ARM) {
cFlags += getSdl2CFlags('./SDL/build-linuxarm64/')
cppFlags += getSdl2CFlags('./SDL/build-linuxarm64/')
libraries += getSdl2StaticLibs('./SDL/build-linuxarm64/').replaceAll("[a-zA-Z0-9\\.\\-/]+libSDL2.a", file("SDL/build-linuxarm64/build/.libs/libSDL2.a").absolutePath)
libraries += getSdl2StaticLibs('./SDL/build-linuxarm64/').replaceAll("[a-zA-Z0-9_\\.\\-/]+libSDL2.a", file("SDL/build-linuxarm64/build/.libs/libSDL2.a").absolutePath)
}
add(MacOsX, x64) {
cFlags += getSdl2CFlags('./SDL/build-macos64/')
Expand Down
Loading