diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42242687..9544a89a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,9 @@ jobs: with: submodules: "recursive" - name: ccache - uses: hendrikmuhs/ccache-action@v1 + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ matrix.compiler }} - ${{ matrix.os }} - asan_ ${{ matrix.asan }} - name: Install dependencies (Ubuntu) working-directory: ./scripts run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 798ca7db..4e4a3e5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,21 +36,35 @@ jobs: build_assets: name: Build Release Assets needs: create_release - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.runner }} strategy: matrix: - os: [ubuntu-20.04] + include: + - runner: ubuntu-20.04 + os: ubuntu-20.04 + arch: amd64 + - runner: self-hosted + os: ubuntu-22.04 + arch: arm64 fail-fast: false steps: - uses: actions/checkout@v3 - - uses: hendrikmuhs/ccache-action@v1 + - uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ matrix.arch }} - ${{ matrix.os }} - - name: Install system dependencies (Ubuntu) + - name: Install system dependencies (Ubuntu 20.04) run: ./scripts/install_deps_ubuntu.sh if: matrix.os == 'ubuntu-20.04' + + - name: Install system dependencies (Ubuntu 22.04) + run: ./scripts/install_deps_ubuntu2204.sh + if: matrix.os == 'ubuntu-22.04' + + - name: Install venv dependencies run: ./scripts/build_venv/build_venv.sh @@ -65,6 +79,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ needs.create_release.outputs.upload_url }} - asset_name: venv-${{ matrix.os }}.tar.gz - asset_path: venv-${{ matrix.os }}.tar.gz + asset_name: venv-${{ matrix.os }}-{{ matrix.arch }}.tar.gz + asset_path: venv-${{ matrix.os }}-{{ matrix.arch }}.tar.gz asset_content_type: application/x-tar diff --git a/scripts/build_venv/build_venv.sh b/scripts/build_venv/build_venv.sh index 6e7dfa5f..31b70498 100755 --- a/scripts/build_venv/build_venv.sh +++ b/scripts/build_venv/build_venv.sh @@ -13,4 +13,4 @@ cmake -B build.venv \ -G Ninja \ $DIR/. -cmake --build build.venv +ninja build.venv -j4 diff --git a/scripts/install_deps_ubuntu2204.sh b/scripts/install_deps_ubuntu2204.sh new file mode 100755 index 00000000..9a8f36ba --- /dev/null +++ b/scripts/install_deps_ubuntu2204.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +set -x # echo on +set -e # exit on error + +cmake --version + +sudo apt-get -qq update +# Please keep this list sorted. +sudo apt-get -y install \ + build-essential \ + ccache \ + clang \ + clang-tidy \ + cmake \ + curl \ + gfortran \ + libassimp-dev \ + libatlas-base-dev \ + libavcodec-dev \ + libavdevice-dev \ + libavformat-dev \ + libavutil-dev \ + libc++-dev \ + libcrypto++-dev \ + libegl1-mesa-dev \ + libglew-dev \ + libglm-dev \ + libgoogle-glog-dev \ + libgtest-dev \ + libopencv-dev \ + libssl-dev \ + libstdc++-10-dev \ + libsuitesparse-dev \ + libswscale-dev \ + libtiff-dev \ + ninja-build \ + python3-dev \ + python3.10-venv \ + && sudo apt-get clean