Merge pull request #1978 from aarroyoc/ci-32-bits

32 bit CI for Linux
This commit is contained in:
Mark Thom
2023-08-27 12:49:20 -06:00
committed by GitHub
2 changed files with 22 additions and 17 deletions

View File

@@ -16,12 +16,13 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- { os: windows-latest, rust-version: stable, shell: 'msys2 {0}' } - { os: windows-latest, rust-version: stable, shell: 'msys2 {0}', target: 'x86_64-pc-windows-gnu'}
- { os: macos-11, rust-version: stable, shell: bash } - { os: macos-11, rust-version: stable, shell: bash, target: 'x86_64-apple-darwin' }
- { os: ubuntu-20.04, rust-version: stable, shell: bash, extra: true } - { os: ubuntu-20.04, rust-version: stable, shell: bash, extra: true, target: 'x86_64-unknown-linux-gnu' }
- { os: ubuntu-20.04, rust-version: 1.65, shell: bash } - { os: ubuntu-20.04, rust-version: stable, shell: bash, target: 'i686-unknown-linux-gnu' }
- { os: ubuntu-20.04, rust-version: beta, shell: bash } - { os: ubuntu-20.04, rust-version: 1.65, shell: bash, target: 'x86_64-unknown-linux-gnu'}
- { os: ubuntu-20.04, rust-version: nightly, shell: bash } - { 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: defaults:
run: run:
shell: ${{ matrix.shell }} shell: ${{ matrix.shell }}
@@ -32,7 +33,11 @@ jobs:
id: toolchain id: toolchain
with: with:
toolchain: ${{ matrix.rust-version }} toolchain: ${{ matrix.rust-version }}
targets: ${{ matrix.target }}
components: clippy, rustfmt 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 - uses: msys2/setup-msys2@v2
if: contains(matrix.os,'windows') if: contains(matrix.os,'windows')
with: with:
@@ -48,14 +53,14 @@ jobs:
~/.cargo/registry/cache/ ~/.cargo/registry/cache/
~/.cargo/git/db/ ~/.cargo/git/db/
target/ 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. # Build and test.
- name: Build library - name: Build library
run: cargo rustc --verbose --lib -- -D warnings run: cargo rustc --target ${{ matrix.target }} --verbose --lib -- -D warnings
- name: Test - name: Test
if: "!matrix.extra" 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 # Extra steps only run once to avoid duplication, when matrix.extra is true
- name: Test and report - name: Test and report
@@ -90,14 +95,14 @@ jobs:
- name: Build release binary - name: Build release binary
if: contains(matrix.rust-version,'stable') if: contains(matrix.rust-version,'stable')
run: | 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 echo "$PWD/target/release" >> $GITHUB_PATH
- name: Publish release binary artifact - name: Publish release binary artifact
if: contains(matrix.rust-version,'stable') if: contains(matrix.rust-version,'stable')
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
path: target/release/scryer-prolog* path: target/${{ matrix.target }}/release/scryer-prolog*
name: scryer-prolog_${{ matrix.os }} name: scryer-prolog_${{ matrix.os }}_${{ matrix.target }}
logtalk-test: logtalk-test:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
@@ -106,7 +111,7 @@ jobs:
# Download prebuilt ubuntu binary from build-test job, setup logtalk # Download prebuilt ubuntu binary from build-test job, setup logtalk
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: scryer-prolog_ubuntu-20.04 name: scryer-prolog_ubuntu-20.04_x86_64-unknown-linux-gnu
- run: | - run: |
chmod +x scryer-prolog chmod +x scryer-prolog
echo "$PWD" >> "$GITHUB_PATH" echo "$PWD" >> "$GITHUB_PATH"
@@ -154,9 +159,9 @@ jobs:
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
- name: Zip binaries for release - name: Zip binaries for release
run: | run: |
zip scryer-prolog_macos-11.zip ./scryer-prolog_macos-11/scryer-prolog 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/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/scryer-prolog.exe zip scryer-prolog_windows-latest.zip ./scryer-prolog_windows-latest_x86_64-pc-windows-gnu/scryer-prolog.exe
- name: Release - name: Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:

View File

@@ -680,7 +680,7 @@ const_assert!(mem::size_of::<HeapCellValue>() == 8);
#[repr(u64)] #[repr(u64)]
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)] #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
pub struct UntypedArenaPtr { pub struct UntypedArenaPtr {
ptr: B61, #[allow(unused)] ptr: B61,
m: bool, m: bool,
#[allow(unused)] padding: B2, #[allow(unused)] padding: B2,
} }