]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Add e2k CI
authorVladislav Shchapov <vladislav@shchapov.ru>
Tue, 27 Jan 2026 15:13:57 +0000 (20:13 +0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 6 Feb 2026 14:51:57 +0000 (15:51 +0100)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
.github/workflows/cmake.yml

index 135bd5088e60860382f4006238a4faa253477991..7d1d288c4792cc3e33468fb79a0bcf042cda051d 100644 (file)
@@ -641,6 +641,30 @@ jobs:
             cmake-args: -DWITH_NATIVE_INSTRUCTIONS=ON
             codecov: macos_clang_arm64_native
 
+          - name: Ubuntu LCC e2kv4
+            os: ubuntu-latest
+            cmake-args: -DWITH_BENCHMARKS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-e2k-lcc.cmake -DMCST_LCC_PREFIX=/opt/mcst/lcc-1.29.12.e2k-v4.8c.linux-6.1 -DQEMU_CPU=elbrus-v4 -DBENCHMARK_ENABLE_WERROR=OFF -DBENCHMARK_FORCE_WERROR=OFF
+            toolchain: 1.29.12.e2k-v4.8c.linux-6.1
+            cflags: -march=elbrus-v4
+            cxxflags: -march=elbrus-v4 -DBENCHMARK_HAS_NO_INLINE_ASSEMBLY
+            ldflags: -static
+
+          - name: Ubuntu LCC e2kv5
+            os: ubuntu-latest
+            cmake-args: -DWITH_BENCHMARKS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-e2k-lcc.cmake -DMCST_LCC_PREFIX=/opt/mcst/lcc-1.29.12.e2k-v5.8c2.linux-6.1 -DQEMU_CPU=elbrus-v5 -DBENCHMARK_ENABLE_WERROR=OFF -DBENCHMARK_FORCE_WERROR=OFF
+            toolchain: 1.29.12.e2k-v5.8c2.linux-6.1
+            cflags: -march=elbrus-v5
+            cxxflags: -march=elbrus-v5 -DBENCHMARK_HAS_NO_INLINE_ASSEMBLY
+            ldflags: -static
+
+          - name: Ubuntu LCC e2kv6
+            os: ubuntu-latest
+            cmake-args: -DWITH_BENCHMARKS=OFF -DBUILD_TESTING=OFF -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-e2k-lcc.cmake -DMCST_LCC_PREFIX=/opt/mcst/lcc-1.29.12.e2k-v6.2c3.linux-6.1 -DQEMU_CPU=elbrus-v6 -DBENCHMARK_ENABLE_WERROR=OFF -DBENCHMARK_FORCE_WERROR=OFF
+            toolchain: 1.29.12.e2k-v6.2c3.linux-6.1
+            cflags: -march=elbrus-v6
+            cxxflags: -march=elbrus-v6 -DBENCHMARK_HAS_NO_INLINE_ASSEMBLY
+            ldflags: -static
+
     steps:
     - name: Checkout repository
       uses: actions/checkout@v6
@@ -651,8 +675,8 @@ jobs:
       uses: actions/checkout@v6
       # Don't test against all corpora with MinGW due to Wine being unable to run parallel jobs
       # without connection timeout. Without parallel jobs test runs using Wine take close to an hour.
-      # Also don't test the extra corpora with Sanitizer builds or RISC-V, due to their slow testing.
-      if: ${{ !contains(matrix.name, 'MinGW') && !contains(matrix.name, 'RISC-V') && !contains(matrix.cmake-args, 'WITH_SANITIZER') }}
+      # Also don't test the extra corpora with Sanitizer builds or RISC-V or e2k, due to their slow testing.
+      if: ${{ !contains(matrix.name, 'MinGW') && !contains(matrix.name, 'RISC-V') && !contains(matrix.name, 'e2k') && !contains(matrix.cmake-args, 'WITH_SANITIZER') }}
       with:
         repository: zlib-ng/corpora
         path: test/data/corpora
@@ -738,6 +762,40 @@ jobs:
       if: contains(matrix.name, 'WASM32')
       uses: mymindstorm/setup-emsdk@v14
 
+    # Get MCST LCC from github actions cache or download from dev.mcst.ru and save to cache
+    - name: Cache MCST LCC ${{ matrix.toolchain }} (Ubuntu)
+      if: contains(matrix.name, 'e2k')
+      id: cache-lcc
+      uses: actions/cache@v5
+      with:
+        path: /opt/mcst
+        key: cache-lcc-${{ matrix.toolchain }}
+
+    - name: Install MCST LCC ${{ matrix.toolchain }} (Ubuntu)
+      if: contains(matrix.name, 'e2k') && steps.cache-lcc.outputs.cache-hit != 'true'
+      shell: bash
+      run: |
+        wget -q https://dev.mcst.ru/downloads/2025-06-27/cross-sp-${{ matrix.toolchain }}_64.tgz
+        sudo tar -xzf cross-sp-${{ matrix.toolchain }}_64.tgz -C /
+        rm -f cross-sp-${{ matrix.toolchain }}_64.tgz
+
+    # Get qemu-e2k-static from github actions cache or download from dev.mcst.ru and save to cache
+    - name: Cache MCST QEMU (Ubuntu)
+      if: contains(matrix.name, 'e2k')
+      id: cache-qemu-e2k-static
+      uses: actions/cache@v5
+      with:
+        path: /usr/local/bin/qemu-e2k-static
+        key: cache-qemu-e2k-static-20251226
+
+    - name: Install MCST QEMU (Ubuntu)
+      if: contains(matrix.name, 'e2k') && steps.cache-qemu-e2k-static.outputs.cache-hit != 'true'
+      shell: bash
+      run: |
+        wget -q https://dev.mcst.ru/downloads/2025-12-26/qemu-e2k-static
+        chmod +x qemu-e2k-static
+        sudo mv qemu-e2k-static /usr/local/bin
+
     - name: Initialize Wine
       # Prevent parallel test jobs from initializing Wine at the same time
       if: contains(matrix.packages, 'wine')