Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build #720

Merged
merged 19 commits into from
Sep 10, 2024
Merged

Build #720

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 1 addition & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,21 +179,7 @@ jobs:
- store_artifacts:
path: /distrib

# -------------------------------------
# publish artifact on github
# -------------------------------------
github_release:
<<: *defaults

steps:
- attach_workspace:
at: /
- run: apt-get update; DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates golang git
- run: go get github.com/tcnksm/ghr
- deploy:
name: "Deploy to Github"
command: $HOME/go/bin/ghr -t $GITHUB_TOKEN -u $CIRCLE_PROJECT_USERNAME -r $CIRCLE_PROJECT_REPONAME $CIRCLE_TAG /distrib


workflows:
version: 2
build:
Expand Down Expand Up @@ -247,12 +233,4 @@ workflows:
filters:
tags:
only: /.*/
- github_release:
requires:
- store_artifact
filters:
branches:
ignore: /.*/
tags:
only: /.*/

53 changes: 1 addition & 52 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,64 +84,13 @@ linuxarm64_docker_builder:
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker push $CIRRUS_REPO_FULL_NAME:${TAG}-arm64

windows_docker_builder:
only_if: $CIRRUS_TAG == '' && $CIRRUS_BRANCH != 'master'
timeout_in: 120m
platform: windows
os_version: 2019
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[864955f576fec35ebe9ebb2102689412213437cf0db640570b886bdf6369950dacbb77c7c9e690a720607a87e7ea3b18]
CIRRUS_CLONE_DEPTH: 100
script: |
docker info
set TAG=%CIRRUS_BRANCH%
docker build --no-cache -t %CIRRUS_REPO_FULL_NAME%:%TAG%-windows . -f Dockerfile.windows
docker login --username=%DOCKERHUB_USER% --password=%DOCKERHUB_PASS%
docker push %CIRRUS_REPO_FULL_NAME%:%TAG%-windows

windowsbranch_docker_builder:
only_if: $CIRRUS_TAG == '' && $CIRRUS_BRANCH == 'master'
timeout_in: 120m
platform: windows
os_version: 2019
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[864955f576fec35ebe9ebb2102689412213437cf0db640570b886bdf6369950dacbb77c7c9e690a720607a87e7ea3b18]
CIRRUS_CLONE_DEPTH: 100
script: |
docker info
set TAG=latest
docker build --no-cache -t %CIRRUS_REPO_FULL_NAME%:%TAG%-windows . -f Dockerfile.windows
docker login --username=%DOCKERHUB_USER% --password=%DOCKERHUB_PASS%
docker push %CIRRUS_REPO_FULL_NAME%:%TAG%-windows

windowstag_docker_builder:
only_if: $CIRRUS_TAG != ''
timeout_in: 120m
platform: windows
os_version: 2019
env:
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
DOCKERHUB_PASS: ENCRYPTED[864955f576fec35ebe9ebb2102689412213437cf0db640570b886bdf6369950dacbb77c7c9e690a720607a87e7ea3b18]
CIRRUS_CLONE_DEPTH: 100
script: |
docker info
set TAG=%CIRRUS_TAG%
docker build --no-cache -t %CIRRUS_REPO_FULL_NAME%:%TAG%-windows . -f Dockerfile.windows
docker login --username=%DOCKERHUB_USER% --password=%DOCKERHUB_PASS%
docker push %CIRRUS_REPO_FULL_NAME%:%TAG%-windows


publish_docker_builder:
depends_on:
- linuxarmv6
- linuxarmv7
- linuxarm64
- linux
- windows
- windowsbranch
- windowstag
env:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKERHUB_USER: ENCRYPTED[ccd1af2835558f6b3e08fa3dd8ad95e7b3eaf3b83220433093d6335a3f4727f4c53c4053587d1594799e72e331d1017d]
Expand All @@ -150,7 +99,7 @@ publish_docker_builder:
docker info
export TAG=${CIRRUS_TAG:-latest}
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker manifest create --amend $CIRRUS_REPO_FULL_NAME:${TAG} $CIRRUS_REPO_FULL_NAME:${TAG}-amd64 $CIRRUS_REPO_FULL_NAME:${TAG}-armv7 $CIRRUS_REPO_FULL_NAME:${TAG}-armv6 $CIRRUS_REPO_FULL_NAME:${TAG}-windows $CIRRUS_REPO_FULL_NAME:${TAG}-arm64
docker manifest create --amend $CIRRUS_REPO_FULL_NAME:${TAG} $CIRRUS_REPO_FULL_NAME:${TAG}-amd64 $CIRRUS_REPO_FULL_NAME:${TAG}-armv7 $CIRRUS_REPO_FULL_NAME:${TAG}-armv6 $CIRRUS_REPO_FULL_NAME:${TAG}-arm64
docker manifest annotate $CIRRUS_REPO_FULL_NAME:${TAG} $CIRRUS_REPO_FULL_NAME:${TAG}-armv7 --os linux --arch arm --variant v7
docker manifest annotate $CIRRUS_REPO_FULL_NAME:${TAG} $CIRRUS_REPO_FULL_NAME:${TAG}-armv6 --os linux --arch arm --variant v6l
docker manifest push $CIRRUS_REPO_FULL_NAME:${TAG} -p
95 changes: 95 additions & 0 deletions .github/workflows/cpp-cross-linux-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: C/C++ CI linux cross armv6/armv7/arm64

on: [push]

jobs:
build:
strategy:
matrix:
include:
- buildtype: Debug
archtype: arm
arch: armv6l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%201%2C%20Zero/cross-gcc-10.2.0-pi_0-1.tar.gz
prefix: arm-linux-gnueabihf

- buildtype: Release
archtype: arm
arch: armv6l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%201%2C%20Zero/cross-gcc-10.2.0-pi_0-1.tar.gz
prefix: arm-linux-gnueabihf

- buildtype: Debug
archtype: arm
arch: armv7l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%202%2C%203/cross-gcc-10.2.0-pi_2-3.tar.gz
prefix: arm-linux-gnueabihf

- buildtype: Release
archtype: arm
arch: armv7l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%202%2C%203/cross-gcc-10.2.0-pi_2-3.tar.gz
prefix: arm-linux-gnueabihf

- buildtype: Debug
archtype: arm64
arch: arm64
prefix: aarch64-linux-gnu

- buildtype: Release
archtype: arm64
arch: arm64
prefix: aarch64-linux-gnu

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: pkg
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends g++ autoconf automake libtool xz-utils cmake p7zip-full
if [ -z "${{ matrix.crosscompiler }}" ]; then
sudo apt-get install -y --no-install-recommends gcc-${{ matrix.prefix }} g++-${{ matrix.prefix }}
else
wget -qO- ${{ matrix.crosscompiler }} | tar xz
echo "$(pwd)/$(ls -d cross-pi-gcc-*)/bin" >> $GITHUB_PATH
fi

- name: depot_tools
run: |
git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "$(pwd)/depot_tools" >> $GITHUB_PATH

- name: fetch webrtc
run: |
mkdir webrtc
pushd webrtc
fetch --no-history --nohooks webrtc
./src/build/linux/sysroot_scripts/install-sysroot.py --arch=${{ matrix.archtype }}
sed -i -e "s|'src/resources'],|'src/resources'],'condition':'rtc_include_tests==true',|" src/DEPS
gclient sync
popd

- name: build
run: |
cmake -DWEBRTCROOT=$(pwd)/webrtc -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch }} -DCMAKE_LIBRARY_ARCHITECTURE=${{ matrix.prefix }} -DCMAKE_SYSTEM_NAME=Linux -DCMAKE_C_COMPILER=${{ matrix.prefix }}-gcc -DCMAKE_CXX_COMPILER=${{ matrix.prefix }}-g++ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY -DWEBRTCDESKTOPCAPTURE=OFF .
make

- name: cpack
run: |
rm -f *.tar.gz
cpack
echo "artifactPath=$(ls *.tar.gz)" >> $GITHUB_ENV

- uses: actions/upload-artifact@v3
with:
name: ${{ env.artifactPath }}
path: ${{ env.artifactPath }}

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ env.artifactPath }}
57 changes: 0 additions & 57 deletions .github/workflows/cpp-cross-linux.yml

This file was deleted.

47 changes: 43 additions & 4 deletions .github/workflows/cpp-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,59 @@ jobs:
strategy:
matrix:
include:
- os: windows-latest
dockerfile: Dockerfile.windows
arch: windows
- os: ubuntu-latest
dockerfile: Dockerfile.arm64
label: arm64
arch: arm64
image: arm64v8/ubuntu
- os: ubuntu-latest
dockerfile: Dockerfile.rpi
label: armv6l
arch: armv6l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%201%2C%20Zero/cross-gcc-10.2.0-pi_0-1.tar.gz
image: balenalib/raspberry-pi
- os: ubuntu-latest
dockerfile: Dockerfile.rpi
arch: armv7l
crosscompiler: https://sourceforge.net/projects/raspberry-pi-cross-compilers/files/Raspberry%20Pi%20GCC%20Cross-Compiler%20Toolchains/Buster/GCC%2010.2.0/Raspberry%20Pi%202%2C%203/cross-gcc-10.2.0-pi_2-3.tar.gz
image: balenalib/raspberry-pi2
- os: ubuntu-latest
dockerfile: Dockerfile
label: amd64
arch: amd64

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Build an image from Dockerfile
run: docker build -t docker.io/${{ github.repository }}:${{ matrix.label }} -f ${{ matrix.dockerfile }} .
run: |
docker build -t docker.io/${{ github.repository }}:${{ github.base_ref || github.ref_name }}-${{ matrix.arch }} -f ${{ matrix.dockerfile }} --build-arg CROSSCOMPILER=${{ matrix.crosscompiler }} --build-arg ARCH=${{ matrix.arch }} --build-arg IMAGE=${{ matrix.image }} .

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push to Container Registry
run: |
docker push docker.io/${{ github.repository }}:${{ github.base_ref || github.ref_name }}-${{ matrix.arch }}

multiarch:
needs: build
runs-on: ubuntu-latest
steps:
- name: Publish multiarch image
env:
DOCKER_CLI_EXPERIMENTAL: enabled
run: |
docker info
export TAG=${{ github.base_ref || github.ref_name }}
export MANIFEST=${TAG}
[ "$TAG" == "master" ] && export MANIFEST=latest
docker manifest create --amend docker.io/${{ github.repository }}:${MANIFEST} docker.io/${{ github.repository }}:${TAG}-amd64 docker.io/${{ github.repository }}:${TAG}-armv7l docker.io/${{ github.repository }}:${TAG}-armv6l docker.io/${{ github.repository }}:${TAG}-windows docker.io/${{ github.repository }}:${TAG}-arm64
docker manifest annotate docker.io/${{ github.repository }}:${MANIFEST} docker.io/${{ github.repository }}:${TAG}-armv7l --os linux --arch arm --variant v7
docker manifest annotate docker.io/${{ github.repository }}:${MANIFEST} docker.io/${{ github.repository }}:${TAG}-armv6l --os linux --arch arm --variant v6l
docker manifest push docker.io/${{ github.repository }}:${MANIFEST} -p
4 changes: 0 additions & 4 deletions .github/workflows/cpp-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
run: |
export PATH=$(pwd)/webrtc/src/third_party/llvm-build/Release+Asserts/bin:$PATH
cmake -DWEBRTCROOT=$(pwd)/webrtc -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DDETECT_OPENSSL=OFF .
file $(pwd)/webrtc/src/out/${{ matrix.buildtype }}/obj/api/video_codecs/libbuiltin_video_encoder_factory.a
file $(pwd)/webrtc/src/out/${{ matrix.buildtype }}/obj/libwebrtc.a
ar -t $(pwd)/webrtc/src/out/${{ matrix.buildtype }}/obj/api/video_codecs/libbuiltin_video_encoder_factory.a
ar tv $(pwd)/webrtc/src/out/${{ matrix.buildtype }}/obj/libwebrtc.a
make VERBOSE=1

- name: cpack
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/cpp-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ jobs:
- name: pkg
shell: cmd
run: |
choco install --no-progress -y windows-sdk-11-version-22h2-all
choco install --ignorepackagecodes --no-progress -y visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --nocache --installPath %MSVC_PATH%"
choco install --ignorepackagecodes --no-progress -y visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Component.VC.ATLMFC --includeRecommended --nocache --installPath %MSVC_PATH%"
git config --global core.autocrlf false
git config --global core.filemode false
env:
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community"
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\Community"

- name: depot_tools
shell: bash
Expand All @@ -39,7 +38,6 @@ jobs:
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
CLANG_VERSION: ToT
PYTHONIOENCODING: UTF-8
GYP_MSVS_VERSION: 2019

- name: build
shell: cmd
Expand All @@ -51,11 +49,10 @@ jobs:
cmake -G Ninja -DCMAKE_C_COMPILER=clang-cl.exe -DCMAKE_CXX_COMPILER=clang-cl.exe -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }} -DCMAKE_MAKE_PROGRAM=ninja.bat -DDETECT_OPENSSL=OFF .
ninja
env:
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community"
MSVC_PATH: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\Community"
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
CLANG_VERSION: ToT
PYTHONIOENCODING: UTF-8
GYP_MSVS_VERSION: 2019

- name: cpack
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fetch-depth: 0

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build
FROM ubuntu:24.04 as builder
FROM ubuntu:24.04 AS builder
LABEL [email protected]
ARG USERNAME=dev
WORKDIR /webrtc-streamer
Expand Down
Loading
Loading