Skip to content

Commit

Permalink
Try to use linux/arm64 docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeySeroshtan committed Dec 2, 2024
1 parent 3ecce02 commit 2e04564
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 30 deletions.
52 changes: 22 additions & 30 deletions .github/workflows/build-linux-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,27 @@ on:
- "**"
jobs:
build-linux:
runs-on: ubuntu22-arm64
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4
- name: Configure toolchain
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Build and push to local registry
uses: docker/build-push-action@v6
with:
push: true
tags: localhost:5000/virgil-crypto-c-arm64:latest

- name: Inspect
run: |
sudo apt update
cmake --version
python3 --version
pip3 list --outdated
pip3 install -U protobuf grpcio-tools
- name: Configure project
run: >
cmake -S. -Bbuild
-DENABLE_HEAVY_TESTS=OFF
-DVIRGIL_C_MT_TESTING=OFF
-DENABLE_BENCHMARKING=ON
-DVIRGIL_POST_QUANTUM=ON
-DVIRGIL_PROGRAMS=ON
- name: Build for testing
run: cmake --build build -- -j$(nproc)
- name: Run tests
working-directory: build
run: ctest --output-on-failure
- name: Build multi-threading tests
run: |
cmake -S. -Bbuild -DVIRGIL_C_MT_TESTING=ON
cmake --build build -- -j$(nproc)
- name: Run multi-threading tests
working-directory: build
run: ctest -L multi-threading --output-on-failure
- name: Run benchmarks
run: ./build/benchmarks/foundation/bench
docker buildx imagetools inspect localhost:5000/virgil-crypto-c-arm64:latest
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Dockerfile for arm64 build
#
FROM ubuntu:24.04
RUN apt-get update
RUN apt-get install -y build-essential cmake git python3 python3-pip python3-venv

WORKDIR /home/build-dir

COPY . .
RUN cmake -S . -B build
RUN cmake --build build -j10
WORKDIR /home/build-dir/build
RUN ctest --output-on-failure
WORKDIR /home/build-dir

0 comments on commit 2e04564

Please sign in to comment.