]> Repositorios git - scryer-prolog.git/commitdiff
fix ci and setup cross-compilation
authorSkgland <[email protected]>
Sat, 25 Apr 2026 19:41:59 +0000 (21:41 +0200)
committerBennet Bleßmann <[email protected]>
Sun, 24 May 2026 08:39:20 +0000 (10:39 +0200)
.cargo/config.toml [new file with mode: 0644]
.github/actions/setup-rust/action.yml
.github/workflows/ci.yml

diff --git a/.cargo/config.toml b/.cargo/config.toml
new file mode 100644 (file)
index 0000000..8971f27
--- /dev/null
@@ -0,0 +1,2 @@
+[target.s390x-unknown-linux-gnu]
+linker = "/usr/bin/s390x-linux-gnu-gcc"
index 45f087e69b3f89b9c03c4a164ee7cd3912275ebc..c30064ebd23955537ccaa86b9bd22fee1a33cfcd 100644 (file)
@@ -32,6 +32,13 @@ runs:
       sudo apt-get install libssl-dev:i386 gcc-multilib clang -y
       echo "CC=clang" >> $GITHUB_ENV
       echo "PKG_CONFIG_SYSROOT_DIR=/" >> $GITHUB_ENV
+      
+  - name: Install s390x cross-compilation toolchain
+    if: ${{ matrix.target == 's390x-unknown-linux-gnu' }}
+    shell: bash
+    run: |
+      sudo apt-get update
+      sudo apt-get install -y gcc-s390x-linux-gnu
 
   - uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
     with:
index 912932e46b99af80c427743b296e77552070d263..1f3d6905f278e6c053dd462f95066f9f41f8cc07 100644 (file)
@@ -61,20 +61,22 @@ jobs:
           # FIXME(issue #2138): run wasm tests, failing to run since https://github.com/mthom/scryer-prolog/pull/2137 removed wasm-pack
           - { os: ubuntu-22.04,   rust-version: nightly, target: 'wasm32-unknown-unknown',   publish: true, args: '--no-default-features' , test-args: '--no-run --no-default-features', use_swap: true }
           # Cargo.toml rust-version
-          - { os: ubuntu-22.04,   rust-version: "${{ needs.read-msrv.outputs.msrv }}" ,  target: 'x86_64-unknown-linux-gnu'}
-          - { os: ubuntu-22.04,   rust-version: beta,    target: 'x86_64-unknown-linux-gnu'}
-          - { os: ubuntu-22.04,   rust-version: nightly, target: 'x86_64-unknown-linux-gnu', miri: true, components: "miri"} 
-          # run miri for a big-endian target, without features that require a native library i.e. without crypto, crypto-full, ffi, http, tls
-          - { os: ubuntu-22.04,   rust-version: nightly, target: 's390x-unknown-linux-gnu', miri: true, components: "miri", args: '--no-default-features --features=repl,hostname', test-args: '--no-run --no-default-features --features=repl,hostname', miri-args: '--no-default-features --features=repl,hostname' } 
+          - { os: ubuntu-22.04,   rust-version: "${{ needs.read-msrv.outputs.msrv }}" ,  target: 'x86_64-unknown-linux-gnu' }
+          - { os: ubuntu-22.04,   rust-version: beta,    target: 'x86_64-unknown-linux-gnu' }
+          - { os: ubuntu-22.04,   rust-version: nightly, target: 'x86_64-unknown-linux-gnu', miri: true, components: "miri" 
+          # run miri for a big-endian target, without features that require openssl i.e. without http, tls
+          - { os: ubuntu-22.04,   rust-version: nightly, target: 's390x-unknown-linux-gnu', miri: true, components: "miri", args: '--no-default-features --features=repl,hostname,crypto-full,ffi', test-args: '--no-run --no-default-features --features=repl,hostname,crypto-full,ffi' } 
     defaults:
       run:
         shell: bash
     steps:
       - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+
       - uses: actionhippie/swap-space@0cffa893f224708cfb6b011690d8ba819d69c10f # v1.1.0
         if: matrix.use_swap
         with:
           size: 10G
+
       - name: Setup Rust
         uses: ./.github/actions/setup-rust
         with:
@@ -91,7 +93,7 @@ jobs:
 
       - name: Check miri
         if: matrix.miri
-        run: cargo miri test
+        run: cargo miri test ${{ matrix.args }}
 
       # On stable rust builds, build a binary and publish as a github actions
       # artifact. These binaries could be useful for testing the pipeline but