Skip to content

Commit

Permalink
Temp workaround for ain win-x64 builder
Browse files Browse the repository at this point in the history
  • Loading branch information
sieniven committed Jan 3, 2024
1 parent ca58ba0 commit c1e2d05
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ain-win-builder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: ain-win-builder

on:
push:
paths:
- 'ain-win-builder/*'
schedule:
# Runs daily
- cron: '0 1 * * *'

workflow_dispatch:

jobs:
dockerize:
uses: ./.github/workflows/dockerize.yaml
with:
contextdir: ./ain-win-builder
dockerfile: ./ain-win-builder/Dockerfile
tag: defi/ain-win-builder:latest
secrets:
username: ${{ secrets.DOCKER_HUB_USER }}
token: ${{ secrets.DOCKER_HUB_TOKEN }}

2 changes: 2 additions & 0 deletions ain-win-builder/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CLANG_DEFAULT_VERSION=15
RUST_DEFAULT_VERSION=1.72
56 changes: 56 additions & 0 deletions ain-win-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
FROM docker.io/ubuntu:22.04

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

ARG CLANG_DEFAULT_VERSION={{ .Env.CLANG_DEFAULT_VERSION }}
ARG RUST_DEFAULT_VERSION={{ .Env.RUST_DEFAULT_VERSION }}

ENV DEBIAN_FRONTEND=noninteractive
# Setup env from args
ENV CLANG_DEFAULT_VERSION=$CLANG_DEFAULT_VERSION
ENV RUST_DEFAULT_VERSION=$RUST_DEFAULT_VERSION

RUN apt-get update \
&& apt-get install -y apt-transport-https && apt-get upgrade -y

RUN apt-get install -y \
software-properties-common build-essential git libtool autotools-dev automake \
pkg-config bsdmainutils python3 python3-pip libssl-dev libevent-dev libboost-system-dev \
libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev \
libminiupnpc-dev libzmq3-dev libqrencode-dev wget ccache \
libdb-dev libdb++-dev libdb5.3 libdb5.3-dev libdb5.3++ libdb5.3++-dev \
curl cmake zip unzip libc6-dev gcc-multilib locales locales-all

RUN locale-gen "en_US.UTF-8"

RUN apt-get install -y \
g++-mingw-w64-x86-64 mingw-w64-x86-64-dev

RUN update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix && \
update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix

RUN apt-get install -y \
g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libc6-dev-armhf-cross

RUN apt-get install -y \
g++-aarch64-linux-gnu binutils-aarch64-linux-gnu libc6-dev-arm64-cross

RUN apt-get install -y \
python3-dev libcap-dev libbz2-dev libz-dev fonts-tuffy librsvg2-bin libtiff-tools imagemagick libtinfo5

RUN wget --progress=dot:giga -O - "https://apt.llvm.org/llvm.sh" | bash -s ${CLANG_DEFAULT_VERSION}

# hadolint ignore=DL4001
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--default-toolchain="${RUST_DEFAULT_VERSION}" -y

# hadolint ignore=DL4001
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | \
dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) \
signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] \
https://cli.github.com/packages stable main" | \
tee /etc/apt/sources.list.d/github-cli.list > /dev/null
RUN apt-get update \
&& apt-get install -y gh

0 comments on commit c1e2d05

Please sign in to comment.