Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
mnightingale committed Oct 28, 2023
1 parent 918550d commit 3f2f13b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 25 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rapidyenc/build
48 changes: 23 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,36 @@ on: [ push ]

jobs:
build:
name: Build ${{ matrix.os }} ${{ matrix.linux_arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# - os: ubuntu-latest
# linux_arch: x86_64
- os: ubuntu-latest
linux_arch: arm64
# - os: macos-latest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
if: runner.os == 'Linux' && matrix.linux_arch == 'arm64'
uses: docker/setup-qemu-action@v3
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# with:
# platforms: arm64

- uses: docker/setup-buildx-action@v2

- uses: docker/build-push-action@v4
with:
platforms: arm64
context: .
tags: builder:latest
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
push: false

- name: Run the build process with Docker
if: runner.os == 'Linux' && matrix.linux_arch == 'arm64'
uses: addnab/docker-run-action@v3
with:
image: arm64v8/gcc
image: builder:latest
options: |
--platform linux/arm64/v8
--volume ${{ github.workspace }}:/workspace
--workdir /workspace
--platform linux/amd64
# --volume ${{ github.workspace }}/lib:/output
--workdir /usr/src/rapidyenc
run: |
ls -al
apt update && apt install -y cmake
cmake -S rapidyenc -B rapidyenc/build
cmake --build rapidyenc/build --target rapidyenc_static -j2
cmake -B build .
cmake --build build --target rapidyenc_static
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rapidyenc/build
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM --platform=$BUILDPLATFORM gcc AS cross

ARG TARGETPLATFORM

RUN apt-get update && apt-get install -y cmake

WORKDIR /usr/src/rapidyenc
COPY rapidyenc .

0 comments on commit 3f2f13b

Please sign in to comment.