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 a build for ARM architecture #5416

Merged
merged 3 commits into from
Jan 9, 2024
Merged
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
6 changes: 6 additions & 0 deletions .ci/disable_formats.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ echo 'KeePass-opencl = Y' >> ../run/john-local.conf
# These formats fail OpenCL CPU runtime
echo 'RAR-opencl = Y' >> ../run/john-local.conf

if [[ $(uname -m) == "aarch64" ]]; then
# SunMD5 format crashes on ARM. macOS and Linux
# See https://github.com/openwall/john/issues/5296
echo 'sunmd5 = Y' >> ../run/john-local.conf
fi

# These formats run very slowly inside CI
# Time measures are from Intel CPU driver running inside Docker
echo 'ansible-opencl = Y' >> ../run/john-local.conf # (282.202952 secs) PASS
Expand Down
3 changes: 3 additions & 0 deletions .circleci/circle-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ if [[ $1 == "BUILD" ]]; then
echo '--------------------------------------------------------------------------------'

elif [[ $1 == "TEST" ]]; then
# Disable problematic formats before testing
source ../.ci/disable_formats.sh

echo '---------------------------------- Build Info ----------------------------------'
$WINE $JTR --list=build-info
echo '--------------------------------------------------------------------------------'
Expand Down
46 changes: 24 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
- run:
name: Testing JtR
command: .circleci/circle-ci.sh TEST
no_output_timeout: 20m
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We (probably) don't need this.


wine-32bits:
<<: *common_linux
Expand All @@ -34,7 +33,7 @@ jobs:
no-plugs:
<<: *common_linux
docker:
- image: claudioandre/john:opencl18
- image: claudioandre/john:opencl
environment:
OMP_NUM_THREADS: 2
PLUGS: "none"
Expand All @@ -44,7 +43,7 @@ jobs:
encoding-cpu:
<<: *common_linux
docker:
- image: ghcr.io/openwall/john-ci:fedora.32
- image: ghcr.io/claudioandre-br/john-ci:fedora.latest
environment:
OMP_NUM_THREADS: 2
ENCODING_TEST: "cpu"
Expand All @@ -60,7 +59,7 @@ jobs:
asan:
<<: *common_linux
docker:
- image: ghcr.io/openwall/john-ci:fedora.32
- image: ghcr.io/claudioandre-br/john-ci:fedora.latest
environment:
OMP_NUM_THREADS: 2
ASAN_TEST: "yes"
Expand All @@ -69,55 +68,58 @@ jobs:
test-full:
<<: *common_linux
docker:
- image: ghcr.io/openwall/john-ci:fedora.32
- image: ghcr.io/claudioandre-br/john-ci:fedora.latest
environment:
OMP_NUM_THREADS: 1
ASAN_TEST: "yes"
FULL_TEST: "yes"
BUILD_OPTS: "--enable-asan --disable-openmp --disable-opencl"

fast-formats-omp:
<<: *common_linux
docker:
- image: ghcr.io/openwall/john-ci:fedora.32
environment:
OMP_NUM_THREADS: 1
ASAN_TEST: "yes"
FULL_TEST: "yes"
BUILD_OPTS: "--enable-asan --enable-openmp-for-fast-formats --disable-opencl"

non-SIMD:
<<: *common_linux
docker:
- image: ghcr.io/openwall/john-ci:fedora.32
- image: ghcr.io/claudioandre-br/john-ci:fedora.latest
environment:
OMP_NUM_THREADS: 2
ASAN_TEST: "yes"
FULL_TEST: "yes"
BUILD_OPTS: "--enable-asan --disable-simd --disable-opencl"
BUILD_OPTS: "--enable-asan --enable-openmp-for-fast-formats --disable-opencl"

fast-formats-omp-x-non-SIMD:
<<: *common_linux
docker:
- image: ghcr.io/openwall/john-ci:fedora.32
- image: ghcr.io/claudioandre-br/john-ci:fedora.latest
environment:
OMP_NUM_THREADS: 2
ASAN_TEST: "yes"
FULL_TEST: "yes"
BUILD_OPTS: "--enable-asan --enable-openmp-for-fast-formats --disable-simd --disable-opencl"

arm:
machine:
image: ubuntu-2204:current
resource_class: arm.medium
steps:
- checkout
- run:
name: Preparing
command: sudo apt update && sudo apt install -y libssl-dev zlib1g-dev libgmp-dev libpcap-dev libbz2-dev && uname -a
- run:
name: Building JtR
command: .circleci/circle-ci.sh BUILD
- run:
name: Testing JtR
command: .circleci/circle-ci.sh TEST

workflows:
version: 2
build:
jobs:
- asan
- arm
- encoding-cpu
- wine-64bits
- no-plugs

- non-SIMD:
requires:
- no-plugs
- encoding-opencl:
requires:
- encoding-cpu
Expand Down