Changeset - r27225:76d4bd86222b
[Not reviewed]
master
0 4 0
Patric Stout - 19 months ago 2023-05-02 21:12:52
truebrain@openttd.org
Change: [CI] update emscripten and liblzma to the latest version (#10757)
4 files changed with 32 insertions and 28 deletions:
0 comments (0 inline, 0 general)
.github/workflows/ci-build.yml
Show inline comments
 
@@ -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
 
@@ -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: |
 
@@ -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:
.github/workflows/preview_build.yml
Show inline comments
 
@@ -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
 
@@ -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: |
 
@@ -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
os/emscripten/Dockerfile
Show inline comments
 
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
os/emscripten/emsdk-liblzma.patch
Show inline comments
 
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
 

	
 
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.
 
 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
 

	
 
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;
 

	
 
@@ -35,9 +25,9 @@ diff --git a/src/settings.js b/src/setti
 
 // 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 @@
 
@@ -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):
 
@@ -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
0 comments (0 inline, 0 general)