]> Repositorios git - scryer-prolog.git/commitdiff
32 bit CI for Linux
authorAdrián Arroyo Calle <[email protected]>
Sat, 26 Aug 2023 07:28:46 +0000 (09:28 +0200)
committerAdrián Arroyo Calle <[email protected]>
Sun, 27 Aug 2023 17:25:54 +0000 (19:25 +0200)
.github/workflows/ci.yml
src/types.rs

index 24fb4b81e819eacdd640f3abbe9e7048c5451391..2361dcec7aaf42d986ace3d149602adad94b5632 100644 (file)
@@ -16,12 +16,13 @@ jobs:
     strategy:
       matrix:
         include:
-          - { os: windows-latest, rust-version: stable,  shell: 'msys2 {0}' }
-          - { os: macos-11,       rust-version: stable,  shell: bash }
-          - { os: ubuntu-20.04,   rust-version: stable,  shell: bash, extra: true }
-          - { os: ubuntu-20.04,   rust-version: 1.65,    shell: bash }
-          - { os: ubuntu-20.04,   rust-version: beta,    shell: bash }
-          - { os: ubuntu-20.04,   rust-version: nightly, shell: bash }
+          - { os: windows-latest, rust-version: stable,  shell: 'msys2 {0}', target: 'x86_64-pc-windows-gnu'}
+          - { os: macos-11,       rust-version: stable,  shell: bash, target: 'x86_64-apple-darwin' }
+          - { os: ubuntu-20.04,   rust-version: stable,  shell: bash, extra: true, target: 'x86_64-unknown-linux-gnu' }
+          - { os: ubuntu-20.04,   rust-version: stable,  shell: bash, target: 'i686-unknown-linux-gnu' }
+          - { os: ubuntu-20.04,   rust-version: 1.65,    shell: bash, target: 'x86_64-unknown-linux-gnu'}
+          - { os: ubuntu-20.04,   rust-version: beta,    shell: bash, target: 'x86_64-unknown-linux-gnu'}
+          - { os: ubuntu-20.04,   rust-version: nightly, shell: bash, target: 'x86_64-unknown-linux-gnu'}
     defaults:
       run:
         shell: ${{ matrix.shell }}
@@ -32,7 +33,11 @@ jobs:
         id: toolchain
         with:
           toolchain: ${{ matrix.rust-version }}
+          targets: ${{ matrix.target }}
           components: clippy, rustfmt
+      - name: Install i686 dependencies
+        if: "contains(matrix.target,'i686')"
+        run: sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install libssl-dev:i386 gcc-multilib clang -y && echo "CC=clang" >> $GITHUB_ENV && echo "PKG_CONFIG_SYSROOT_DIR=/" >> $GITHUB_ENV
       - uses: msys2/setup-msys2@v2
         if: contains(matrix.os,'windows')
         with:
@@ -48,14 +53,14 @@ jobs:
             ~/.cargo/registry/cache/
             ~/.cargo/git/db/
             target/
-          key: ${{ matrix.os }}_rustc-${{ steps.toolchain.outputs.cachekey }}_cargo-${{ hashFiles('**/Cargo.lock') }}
+          key: ${{ matrix.os }}_${{ matrix.target }}_rustc-${{ steps.toolchain.outputs.cachekey }}_cargo-${{ hashFiles('**/Cargo.lock') }}
 
       # Build and test.
       - name: Build library
-        run: cargo rustc --verbose --lib -- -D warnings
+        run: cargo rustc --target ${{ matrix.target }} --verbose --lib -- -D warnings
       - name: Test
         if: "!matrix.extra"
-        run: cargo test --all --verbose
+        run: cargo test --target ${{ matrix.target }} --all --verbose
 
       # Extra steps only run once to avoid duplication, when matrix.extra is true
       - name: Test and report
@@ -90,14 +95,14 @@ jobs:
       - name: Build release binary
         if: contains(matrix.rust-version,'stable')
         run: |
-          cargo rustc --verbose --bin scryer-prolog --release -- -D warnings
+          cargo rustc --target ${{ matrix.target }} --verbose --bin scryer-prolog --release -- -D warnings
           echo "$PWD/target/release" >> $GITHUB_PATH
       - name: Publish release binary artifact
         if: contains(matrix.rust-version,'stable')
         uses: actions/upload-artifact@v3
         with:
-          path: target/release/scryer-prolog*
-          name: scryer-prolog_${{ matrix.os }}
+          path: target/${{ matrix.target }}/release/scryer-prolog*
+          name: scryer-prolog_${{ matrix.os }}_${{ matrix.target }}
 
   logtalk-test:
     runs-on: ubuntu-20.04
@@ -106,7 +111,7 @@ jobs:
       # Download prebuilt ubuntu binary from build-test job, setup logtalk
       - uses: actions/download-artifact@v3
         with:
-          name: scryer-prolog_ubuntu-20.04
+          name: scryer-prolog_ubuntu-20.04_x86_64-unknown-linux-gnu
       - run: |
           chmod +x scryer-prolog
           echo "$PWD" >> "$GITHUB_PATH"
@@ -154,9 +159,9 @@ jobs:
       - uses: actions/download-artifact@v3
       - name: Zip binaries for release
         run: |
-          zip scryer-prolog_macos-11.zip ./scryer-prolog_macos-11/scryer-prolog
-          zip scryer-prolog_ubuntu-20.04.zip ./scryer-prolog_ubuntu-20.04/scryer-prolog
-          zip scryer-prolog_windows-latest.zip ./scryer-prolog_windows-latest/scryer-prolog.exe
+          zip scryer-prolog_macos-11.zip ./scryer-prolog_macos-11_x86_64-apple-darwin/scryer-prolog
+          zip scryer-prolog_ubuntu-20.04.zip ./scryer-prolog_ubuntu-20.04_x86_64-unknown-linux-gnu/scryer-prolog
+          zip scryer-prolog_windows-latest.zip ./scryer-prolog_windows-latest_x86_64-pc-windows-gnu/scryer-prolog.exe
       - name: Release
         uses: softprops/action-gh-release@v1
         with:
index a816f84f2ae555ee3cc48ecd210cbf1ea9a552a4..350a76dd60a9b6e26e960fc3272fd539f8ff1d92 100644 (file)
@@ -680,7 +680,7 @@ const_assert!(mem::size_of::<HeapCellValue>() == 8);
 #[repr(u64)]
 #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
 pub struct UntypedArenaPtr {
-    ptr: B61,
+    #[allow(unused)] ptr: B61,
     m: bool,
     #[allow(unused)] padding: B2,
 }