Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add test on big-endian arch in CI #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,3 +271,37 @@ jobs:
"--features=hash,object",
"--features=object,authenticode"
]

other-archs:
name: Test other architectures
runs-on: ubuntu-22.04
env:
CROSS_VERSION: v0.2.5
steps:
- uses: actions/checkout@v3
- name: Install and configure Cross
run: |
# Copied from rust-lang/regex CI:
# <https://github.com/rust-lang/regex/blob/329c6a32/.github/workflows/ci.yml>
dir="$RUNNER_TEMP/cross-download"
mkdir "$dir"
echo "$dir" >> $GITHUB_PATH
cd "$dir"
curl -LO "https://github.com/cross-rs/cross/releases/download/$CROSS_VERSION/cross-x86_64-unknown-linux-musl.tar.gz"
tar xf cross-x86_64-unknown-linux-musl.tar.gz
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET=--target ${{ matrix.target }}" >> $GITHUB_ENV
- name: Run tests
run: cross test --target ${{ matrix.target }}
- name: Run tests with authenticode feature
run: cross test --target ${{ matrix.target }} --features authenticode

strategy:
fail-fast: false
matrix:
build: [s390x, aarch64]
include:
- build: s390x
target: s390x-unknown-linux-gnu
- build: aarch64
target: aarch64-unknown-linux-gnu
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ members = [
# - Handle VirtualSize=0 when searching through sections
# - f7e5d82c5f6fa4ca9d6ef5a39e83b6109fe2c18c
object = { git = 'https://github.com/vthib/boreal-object', branch = "version-0.35" }

yara = { git = 'https://github.com/vthib/yara-rust', branch = "version-0.26.0" }
17 changes: 17 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[target.s390x-unknown-linux-gnu]
image = "ghcr.io/cross-rs/s390x-unknown-linux-gnu:main"
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update",
"apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
"apt-get install --assume-yes --no-install-recommends libclang-10-dev clang-10"
]

[target.aarch64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update",
"apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH",
"apt-get install --assume-yes --no-install-recommends libclang-10-dev clang-10"
]
Loading