Skip to content

Commit

Permalink
Add buildenv
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaMisty committed Mar 21, 2022
1 parent fc2f80f commit c997a51
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build buildenv Docker

on:
workflow_dispatch:

env:
REGISTRY: ghcr.io

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master # set the branch to merge to
fetch-depth: 0
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
#-
# uses: docker/setup-buildx-action@v1
# id: buildx
# with:
# install: true
-
name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Push Dockers
run: cd ./buildenv && bash ./build_docker.sh

29 changes: 29 additions & 0 deletions buildenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG IMAGE=arm64v8/alpine:3.15

FROM $IMAGE

RUN apk add zsh git curl wget g++ clang boost-static ninja boost-dev cmake make sudo bash vim libressl-dev util-linux-dev zlib-dev zlib-static

RUN mkdir /buildenv

WORKDIR /buildenv

RUN curl -JO 'https://developer.apple.com/file/?file=security&agree=Yes' -H 'Referer: https://developer.apple.com/security/' && unzip corecrypto.zip
WORKDIR /buildenv/corecrypto
RUN mkdir build; cd build; CC=clang CXX=clang++ cmake ..;
WORKDIR /buildenv/corecrypto/build
RUN sed -i -E 's|^(all: CMakeFiles\/corecrypto_perf)|#\1|' CMakeFiles/Makefile2; sed -i -E 's|^(all: CMakeFiles\/corecrypto_test)|#\1|' CMakeFiles/Makefile2
RUN make -j6; make install

WORKDIR /buildenv

RUN git clone --recursive https://github.com/microsoft/cpprestsdk;
WORKDIR /buildenv/cpprestsdk
RUN sed -i 's|-Wcast-align||' "./Release/CMakeLists.txt"
RUN mkdir build; cd build; cmake -DBUILD_SHARED_LIBS=0 ..; make -j6; make install

WORKDIR /buildenv/

RUN git clone https://github.com/nih-at/libzip && cd libzip; mkdir build; cd build; cmake -DBUILD_SHARED_LIBS=0 ..; make -j6; make install


11 changes: 11 additions & 0 deletions buildenv/build_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
docker build --build-arg IMAGE=arm32v7/alpine:3.15 -t ghcr.io/nyamisty/altserver_builder_alpine_armv7 .
docker push ghcr.io/nyamisty/altserver_builder_alpine_armv7

docker build --build-arg IMAGE=arm64v8/alpine:3.15 -t ghcr.io/nyamisty/altserver_builder_alpine_aarch64 .
docker push ghcr.io/nyamisty/altserver_builder_alpine_aarch64

docker build --build-arg IMAGE=amd64/alpine:3.15 -t ghcr.io/nyamisty/altserver_builder_alpine_amd64 .
docker push ghcr.io/nyamisty/altserver_builder_alpine_amd64

docker build --build-arg IMAGE=i386/alpine:3.15 -t ghcr.io/nyamisty/altserver_builder_alpine_i386 .
docker push ghcr.io/nyamisty/altserver_builder_alpine_i386

0 comments on commit c997a51

Please sign in to comment.