From 86c8211a626371533d3ba7f7997dc982111f60b6 Mon Sep 17 00:00:00 2001 From: Zenichi Amano <2736571+crow-misia@users.noreply.github.com> Date: Sun, 12 Nov 2023 06:15:15 +0900 Subject: [PATCH] =?UTF-8?q?github=20actions=E4=B8=8A=E3=81=A7=E3=81=AFdock?= =?UTF-8?q?er=E3=81=AE=E4=BD=BF=E7=94=A8=E3=82=92=E3=82=84=E3=82=81?= =?UTF-8?q?=E3=82=8B=20clang=E3=81=A8libstd++=E3=81=AE=E7=B5=84=E3=81=BF?= =?UTF-8?q?=E5=90=88=E3=82=8F=E3=81=9B=E3=81=AB=E3=82=88=E3=82=8B=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=83=91=E3=82=A4=E3=83=AB=E3=82=A8=E3=83=A9=E3=83=BC?= =?UTF-8?q?=E5=9B=9E=E9=81=BF=E3=83=91=E3=83=83=E3=83=81=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zenichi Amano <2736571+crow-misia@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- build/linux-arm/Makefile | 3 ++- build/linux-arm64/Makefile | 3 ++- build/linux-x64/Makefile | 3 ++- docker/android/Dockerfile | 26 +++----------------------- docker/linux-arm/Dockerfile | 20 +++----------------- docker/linux-arm64/Dockerfile | 20 +++----------------- docker/linux-x64/Dockerfile | 20 +++----------------- patch/linux_clang_optional.patch | 12 ++++++++++++ scripts/apt_install.sh | 26 ++++++++++++++++++++++++++ 10 files changed, 57 insertions(+), 78 deletions(-) create mode 100644 patch/linux_clang_optional.patch create mode 100755 scripts/apt_install.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4c51d1e8..1e9335c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: diff --git a/build/linux-arm/Makefile b/build/linux-arm/Makefile index 9e9662b5..01ca5b55 100644 --- a/build/linux-arm/Makefile +++ b/build/linux-arm/Makefile @@ -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 diff --git a/build/linux-arm64/Makefile b/build/linux-arm64/Makefile index 611c6e9b..df12e18e 100644 --- a/build/linux-arm64/Makefile +++ b/build/linux-arm64/Makefile @@ -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 diff --git a/build/linux-x64/Makefile b/build/linux-x64/Makefile index 0388d8b9..38a22e91 100644 --- a/build/linux-x64/Makefile +++ b/build/linux-x64/Makefile @@ -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 diff --git a/docker/android/Dockerfile b/docker/android/Dockerfile index f3d7f1a7..6de40c3b 100644 --- a/docker/android/Dockerfile +++ b/docker/android/Dockerfile @@ -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 \ diff --git a/docker/linux-arm/Dockerfile b/docker/linux-arm/Dockerfile index 7fd2b449..99c3eaee 100644 --- a/docker/linux-arm/Dockerfile +++ b/docker/linux-arm/Dockerfile @@ -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 \ diff --git a/docker/linux-arm64/Dockerfile b/docker/linux-arm64/Dockerfile index 23729fa1..7dd724f9 100644 --- a/docker/linux-arm64/Dockerfile +++ b/docker/linux-arm64/Dockerfile @@ -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 \ diff --git a/docker/linux-x64/Dockerfile b/docker/linux-x64/Dockerfile index 2f3175ef..68b128d6 100644 --- a/docker/linux-x64/Dockerfile +++ b/docker/linux-x64/Dockerfile @@ -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 \ diff --git a/patch/linux_clang_optional.patch b/patch/linux_clang_optional.patch new file mode 100644 index 00000000..48df7c98 --- /dev/null +++ b/patch/linux_clang_optional.patch @@ -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 { diff --git a/scripts/apt_install.sh b/scripts/apt_install.sh new file mode 100755 index 00000000..de57c700 --- /dev/null +++ b/scripts/apt_install.sh @@ -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 +