From 68c2682f12a9717f59c63d0f15f4eb9a03242a80 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Tue, 18 Oct 2022 15:34:09 +0300 Subject: [PATCH 1/6] Add CI based on Github Actions Builds on Linux x86_64 and aarch64 Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/ci.yaml | 96 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..fbda1fbfe --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,96 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + name: Build x86_64 + runs-on: ubuntu-18.04 + steps: + - name: Checkout v3d_external + uses: actions/checkout@v3 + with: + submodules: 'recursive' + fetch-depth: 0 + path: v3d_external + + - name: Checkout vaa3d_tools + uses: actions/checkout@v3 + with: + repository: Vaa3D/vaa3d_tools + submodules: 'recursive' + fetch-depth: 0 + path: vaa3d_tools + + - name: Install build dependencies + run: | + set -x + sudo apt-get update -q + sudo apt-get install -y clang-4.0 qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 + sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 + + - name: Setup links + run: | + cd vaa3d_tools + ln -s ../v3d_external/v3d_main v3d_main + ln -s ../v3d_external/bin bin + cd ../v3d_external + ln -s ../vaa3d_tools/released_plugins released_plugins_more + + - name: Build + run: | + set -x + cd v3d_external + ./build.linux -j2 + ls -la + ls -la bin + + build-aarch64: + name: Build aarch64 + runs-on: ubuntu-20.04 + + steps: + - name: Checkout v3d_external + uses: actions/checkout@v3 + with: + submodules: 'recursive' + fetch-depth: 0 + path: v3d_external + + - name: Checkout v3d_tools + uses: actions/checkout@v3 + with: + repository: Vaa3D/vaa3d_tools + submodules: 'recursive' + fetch-depth: 0 + path: vaa3d_tools + + - name: Build + uses: uraimo/run-on-arch-action@v2 + with: + arch: aarch64 + distro: ubuntu18.04 + githubToken: ${{ github.token }} + dockerRunArgs: | + --volume "${PWD}:/v3d" + install: | + set -x + apt-get update -q -y + apt-get install -q -y clang-4.0 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev + update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 + update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 + update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 + + + run: | + set -x + ln -s /v3d/v3d_external/v3d_main /v3d/vaa3d_tools/v3d_main + ln -s /v3d/v3d_external/bin /v3d/vaa3d_tools/bin + ln -s /v3d/vaa3d_tools/released_plugins /v3d/v3d_external/released_plugins_more + cd /v3d/v3d_external + ./build.linux -j2 + ls -la + ls -la bin + \ No newline at end of file From ad33475fbfc569e7f6b199d091cae78d42116567 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Thu, 20 Oct 2022 11:04:11 +0300 Subject: [PATCH 2/6] Install libomp-dev Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fbda1fbfe..d2937a8a3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,7 @@ jobs: run: | set -x sudo apt-get update -q - sudo apt-get install -y clang-4.0 qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev + sudo apt-get install -y clang-4.0 qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libomp-dev sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 @@ -78,7 +78,7 @@ jobs: install: | set -x apt-get update -q -y - apt-get install -q -y clang-4.0 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev + apt-get install -q -y clang-4.0 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 From 3873a94820e167fa41ef01e57d50e7da75968a6c Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Thu, 20 Oct 2022 12:09:48 +0300 Subject: [PATCH 3/6] Try with plain Ubuntu 18.04 instead of the Azure image The Azure one fails with: The following packages have unmet dependencies: libomp-dev : Depends: libomp5 (= 5.0.1-1) E: Unable to correct problems, you have held broken packages. Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/ci.yaml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d2937a8a3..19c4c9161 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,8 +5,19 @@ on: [push, pull_request] jobs: build: name: Build x86_64 - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest + container: + image: ubuntu:18.04 # use plain Ubuntu 18.04 instead of the Azure one steps: + - name: Install build dependencies + run: | + set -x + apt-get update -q + apt-get install -y clang-4.0 git make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev + update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 + update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 + update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 + - name: Checkout v3d_external uses: actions/checkout@v3 with: @@ -22,15 +33,6 @@ jobs: fetch-depth: 0 path: vaa3d_tools - - name: Install build dependencies - run: | - set -x - sudo apt-get update -q - sudo apt-get install -y clang-4.0 qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libomp-dev - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 - - name: Setup links run: | cd vaa3d_tools From 444b9e33966059a4afd5a64424952b84935cb6a8 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Thu, 20 Oct 2022 12:17:59 +0300 Subject: [PATCH 4/6] Add a PPA repository for installing a newer version of Git This is needed because of: The repository will be downloaded using the GitHub REST API To create a local Git repository instead, add Git 2.18 or higher to the PATH Error: Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git 2.18 or higher to the PATH. Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 19c4c9161..0597571d3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,6 +13,9 @@ jobs: run: | set -x apt-get update -q + apt-get install -y -q software-properties-common + add-apt-repository ppa:git-core/ppa + apt-get update -q apt-get install -y clang-4.0 git make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 From f0ee2affcd29ce798402ba0b9e63fcc016ce8983 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Fri, 21 Oct 2022 11:33:33 +0300 Subject: [PATCH 5/6] Remove gcc/g++ 7.x after installing clang 4.x Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/ci.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0597571d3..345d57aa7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,8 @@ jobs: apt-get install -y -q software-properties-common add-apt-repository ppa:git-core/ppa apt-get update -q - apt-get install -y clang-4.0 git make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev + apt-get install -y clang-4.0 git make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev unzip wget + apt-get remove -y gcc g++ update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 @@ -83,7 +84,8 @@ jobs: install: | set -x apt-get update -q -y - apt-get install -q -y clang-4.0 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev + apt-get install -q -y clang-4.0 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev unzip wget + apt-get remove -y gcc g++ update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 From 1cef03a270feb0bb874eab5dc66a177f18dbeda7 Mon Sep 17 00:00:00 2001 From: Martin Tzvetanov Grigorov Date: Fri, 21 Oct 2022 11:38:31 +0300 Subject: [PATCH 6/6] Use gcc-4.8 instead of clang-4 gcc-4.8 and g++-4.8 are available in stock Ubuntu 18.04 Docker images Signed-off-by: Martin Tzvetanov Grigorov --- .github/workflows/ci.yaml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 345d57aa7..04fc6c4df 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,11 +16,10 @@ jobs: apt-get install -y -q software-properties-common add-apt-repository ppa:git-core/ppa apt-get update -q - apt-get install -y clang-4.0 git make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev unzip wget - apt-get remove -y gcc g++ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 - update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 - update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 + apt-get install -q -y git gcc-4.8 g++-4.8 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev unzip wget + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 + update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-4.8 40 + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 40 - name: Checkout v3d_external uses: actions/checkout@v3 @@ -84,12 +83,10 @@ jobs: install: | set -x apt-get update -q -y - apt-get install -q -y clang-4.0 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev unzip wget - apt-get remove -y gcc g++ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-4.0 40 - update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-4.0 40 - update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-4.0 40 - + apt-get install -q -y gcc-4.8 g++-4.8 make qt4-qmake libqt4-dev libqtcore4 libqtgui4 mesa-common-dev libglu1-mesa-dev libhdf5-dev libtiff-dev libomp-dev unzip wget + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 + update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-4.8 40 + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 40 run: | set -x