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

Change: [CI] update emscripten and liblzma to the latest version #10757

Merged
merged 1 commit into from
May 2, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-20.04
container:
# If you change this version, change the number in the cache step too.
image: emscripten/emsdk:3.1.28
image: emscripten/emsdk:3.1.37

steps:
- name: Checkout
Expand All @@ -30,7 +30,7 @@ jobs:
uses: actions/cache@v3
with:
path: /emsdk/upstream/emscripten/cache
key: 3.1.28-${{ runner.os }}
key: 3.1.37-${{ runner.os }}

- name: Patch Emscripten to support LZMA
run: |
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:

echo "::group::Build"
echo "Running on $(nproc) cores"
cmake --build . -j $(nproc) -t openttd
cmake --build . -j $(nproc) --target openttd
echo "::endgroup::"

linux:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/preview_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-20.04
container:
# If you change this version, change the number in the cache step too.
image: emscripten/emsdk:3.1.28
image: emscripten/emsdk:3.1.37

steps:
- name: Update deployment status to in progress
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
uses: actions/cache@v3
with:
path: /emsdk/upstream/emscripten/cache
key: 3.1.28-${{ runner.os }}
key: 3.1.37-${{ runner.os }}

- name: Patch Emscripten to support LZMA
run: |
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:

echo "::group::Build"
echo "Running on $(nproc) cores"
emmake make -j$(nproc)
cmake --build . -j $(nproc) --target openttd
echo "::endgroup::"

- name: Publish preview
Expand Down
2 changes: 1 addition & 1 deletion os/emscripten/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM emscripten/emsdk:3.1.28
FROM emscripten/emsdk:3.1.37

COPY emsdk-liblzma.patch /
RUN cd /emsdk/upstream/emscripten && patch -p1 < /emsdk-liblzma.patch
46 changes: 25 additions & 21 deletions os/emscripten/emsdk-liblzma.patch
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
From 90dd4d4c6b1cedec338ff5b375fffca93700f7bc Mon Sep 17 00:00:00 2001
From 84d0e9112d5c87a714abd21ec8547921f46f37b5 Mon Sep 17 00:00:00 2001
From: milek7 <me@milek7.pl>
Date: Tue, 8 Dec 2020 01:03:31 +0100
Subject: [PATCH] Add liblzma port

---
Source: https://github.com/emscripten-core/emscripten/pull/12990
src/settings.js | 4 ++
tools/ports/liblzma.py | 151 +++++++++++++++++++++++++++++++++++++++++
tools/settings.py | 1 +
3 files changed, 156 insertions(+)
create mode 100644 tools/ports/liblzma.py

Modifed by OpenTTD to have the bare minimum needed to work. Otherwise there
are constantly conflicts when trying to apply this patch to different versions
of emsdk.

diff --git a/tools/settings.py b/tools/settings.py
--- a/tools/settings.py
+++ b/tools/settings.py
@@ -40,6 +40,7 @@ PORTS_SETTINGS = {
'USE_SDL_NET',
'USE_SDL_GFX',
'USE_LIBJPEG',
+ 'USE_LIBLZMA',
'USE_OGG',
'USE_REGAL',
'USE_BOOST_HEADERS',
diff --git a/src/settings.js b/src/settings.js
index f93140d..7b6bec9 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -1450,6 +1450,10 @@ var USE_GIFLIB = false;
@@ -1451,6 +1451,10 @@ var USE_GIFLIB = false;
// [compile+link]
var USE_LIBJPEG = false;

Expand All @@ -35,9 +25,9 @@ diff --git a/src/settings.js b/src/settings.js
// 1 = use libpng from emscripten-ports
// [compile+link]
var USE_LIBPNG = false;

diff --git a/tools/ports/liblzma.py b/tools/ports/liblzma.py
new file mode 100644
index 0000000..6872a8b
--- /dev/null
+++ b/tools/ports/liblzma.py
@@ -0,0 +1,151 @@
Expand All @@ -51,8 +41,8 @@ new file mode 100644
+import logging
+from pathlib import Path
+
+VERSION = '5.4.0'
+HASH = '29b2cd25bb5b234b329ffe9547692d2c29be393db9d8d4ce70a66dfdaebd54433e79a89d80c57e58cd4559c3c68b9845507d5fedf3eec1c528a81e3d9ddbd811'
+VERSION = '5.4.2'
+HASH = '149f980338bea3d66de1ff5994b2b236ae1773135eda68b62b009df0c9dcdf5467f8cb2c06da95a71b6556d60bd3d21f475feced34d5dfdb80ee95416a2f9737'
+
+
+def needed(settings):
Expand Down Expand Up @@ -192,3 +182,17 @@ new file mode 100644
+#endif
+#define VERSION "5.4.0"
+'''
diff --git a/tools/settings.py b/tools/settings.py
index 10d6ca0..827e4a9 100644
--- a/tools/settings.py
+++ b/tools/settings.py
@@ -40,6 +40,7 @@ PORTS_SETTINGS = {
'USE_SDL_NET',
'USE_SDL_GFX',
'USE_LIBJPEG',
+ 'USE_LIBLZMA',
'USE_OGG',
'USE_REGAL',
'USE_BOOST_HEADERS',
--
2.34.1