Skip to content

Commit

Permalink
github actions上ではdockerの使用をやめる
Browse files Browse the repository at this point in the history
clangとlibstd++の組み合わせによるコンパイルエラー回避パッチ作成

Signed-off-by: Zenichi Amano <[email protected]>
  • Loading branch information
crow-misia committed Nov 11, 2023
1 parent 12d6532 commit 86c8211
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Disk Cleanup
run: ./disk_cleanup.sh
- name: Build
run: make -C docker ${{ matrix.name }}
run: make -C build ${{ matrix.name }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion build/linux-arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ patch: common-patch
cd $(SRC_DIR) && \
patch -p2 < $(PATCH_DIR)/4k_linux.patch && \
patch -p2 < $(PATCH_DIR)/disable_use_hermetic_xcode_on_linux.patch && \
patch -p2 < $(PATCH_DIR)/linux_is_pod_deprecate.patch
patch -p2 < $(PATCH_DIR)/linux_is_pod_deprecate.patch && \
patch -p2 < $(PATCH_DIR)/linux_clang_optional.patch

.PHONY: build
build: download patch
Expand Down
3 changes: 2 additions & 1 deletion build/linux-arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ patch: common-patch
cd $(SRC_DIR) && \
patch -p2 < $(PATCH_DIR)/4k_linux.patch && \
patch -p2 < $(PATCH_DIR)/disable_use_hermetic_xcode_on_linux.patch && \
patch -p2 < $(PATCH_DIR)/linux_is_pod_deprecate.patch
patch -p2 < $(PATCH_DIR)/linux_is_pod_deprecate.patch && \
patch -p2 < $(PATCH_DIR)/linux_clang_optional.patch

.PHONY: build
build: download patch
Expand Down
3 changes: 2 additions & 1 deletion build/linux-x64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ patch: common-patch
cd $(SRC_DIR) && \
patch -p2 < $(PATCH_DIR)/4k_linux.patch && \
patch -p2 < $(PATCH_DIR)/disable_use_hermetic_xcode_on_linux.patch && \
patch -p2 < $(PATCH_DIR)/linux_is_pod_deprecate.patch
patch -p2 < $(PATCH_DIR)/linux_is_pod_deprecate.patch && \
patch -p2 < $(PATCH_DIR)/linux_clang_optional.patch

.PHONY: build
build: download patch
Expand Down
26 changes: 3 additions & 23 deletions docker/android/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
# syntax = docker/dockerfile:experimental
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
FROM ubuntu:22.04

RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

RUN \
apt update \
&& apt upgrade -y \
&& apt install -y \
build-essential \
curl \
git \
libncurses5 \
lsb-release \
python \
pkg-config \
rsync \
sudo \
openjdk-11-jdk-headless \
time \
unzip \
cmake

RUN update-java-alternatives -s java-1.11.0-openjdk-amd64
COPY scripts/ /root/scripts/
RUN scripts/apt_install.sh && sudo apt-get install -y openjdk-11-jdk

COPY config/android/ /root/config/android/
COPY build/ /root/build/
COPY Makefile VERSION LICENSE /root/
COPY scripts/ /root/scripts/

RUN \
cd /root \
Expand Down
20 changes: 3 additions & 17 deletions docker/linux-arm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
# syntax = docker/dockerfile:experimental
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
FROM ubuntu:22.04

RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

RUN \
apt update \
&& apt upgrade -y \
&& apt install -y \
build-essential \
curl \
git \
libncurses5 \
lsb-release \
python \
pkg-config \
rsync \
cmake
COPY scripts/ /root/scripts/
RUN scripts/apt_install.sh

COPY config/linux-arm/ /root/config/linux-arm/
COPY build/ /root/build/
COPY Makefile VERSION LICENSE /root/
COPY scripts/ /root/scripts/

RUN \
cd /root \
Expand Down
20 changes: 3 additions & 17 deletions docker/linux-arm64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
# syntax = docker/dockerfile:experimental
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
FROM ubuntu:22.04

RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

RUN \
apt update \
&& apt upgrade -y \
&& apt install -y \
build-essential \
curl \
git \
libncurses5 \
lsb-release \
python \
pkg-config \
rsync \
cmake
COPY scripts/ /root/scripts/
RUN scripts/apt_install.sh

COPY config/linux-arm64/ /root/config/linux-arm64/
COPY build/ /root/build/
COPY Makefile VERSION LICENSE /root/
COPY scripts/ /root/scripts/

RUN \
cd /root \
Expand Down
20 changes: 3 additions & 17 deletions docker/linux-x64/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,14 @@
# syntax = docker/dockerfile:experimental
FROM ubuntu:20.04

ENV DEBIAN_FRONTEND=noninteractive
FROM ubuntu:22.04

RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache

RUN \
apt update \
&& apt upgrade -y \
&& apt install -y \
build-essential \
curl \
git \
libncurses5 \
lsb-release \
python \
pkg-config \
rsync \
cmake
COPY scripts/ /root/scripts/
RUN /root/scripts/apt_install.sh

COPY config/linux-x64/ /root/config/linux-x64/
COPY build/ /root/build/
COPY Makefile VERSION LICENSE /root/
COPY scripts/ /root/scripts/

RUN \
cd /root \
Expand Down
12 changes: 12 additions & 0 deletions patch/linux_clang_optional.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/modules/congestion_controller/goog_cc/loss_based_bwe_v2.h b/src/modules/congestion_controller/goog_cc/loss_based_bwe_v2.h
index 425ca2a0c8..b45c6dd777 100644
--- a/src/modules/congestion_controller/goog_cc/loss_based_bwe_v2.h
+++ b/src/modules/congestion_controller/goog_cc/loss_based_bwe_v2.h
@@ -121,6 +121,7 @@ class LossBasedBweV2 {
double hold_duration_factor = 0.0;
bool use_byte_loss_rate = false;
TimeDelta padding_duration = TimeDelta::Zero();
+ Config() { }
};

struct Derivatives {
26 changes: 26 additions & 0 deletions scripts/apt_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh

set -ex

export DEBIAN_FRONTEND=noninteractive

apt-get remove -y gcc
apt-get autoremove

apt-get update --fix-missing
apt-get upgrade -y

apt-get install -y \
binutils \
cmake \
curl \
git \
lsb-release \
make \
pkg-config \
python3 \
rsync \
sudo \
unzip \
xz-utils

0 comments on commit 86c8211

Please sign in to comment.