2020-12-10 03:08:58 +00:00
|
|
|
name: ci/gh-actions/depends
|
|
|
|
|
2021-04-20 09:47:21 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- '**/README.md'
|
2020-12-10 03:08:58 +00:00
|
|
|
|
2021-09-09 10:57:24 +00:00
|
|
|
env:
|
|
|
|
APT_SET_CONF: |
|
|
|
|
echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
|
|
|
echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
|
|
|
echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom
|
|
|
|
CCACHE_SETTINGS: |
|
|
|
|
ccache --max-size=150M
|
|
|
|
ccache --set-config=compression=true
|
|
|
|
|
2020-12-10 03:08:58 +00:00
|
|
|
jobs:
|
2022-06-29 02:51:43 +00:00
|
|
|
build-cross:
|
2020-12-10 03:08:58 +00:00
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
env:
|
|
|
|
CCACHE_TEMPDIR: /tmp/.ccache-temp
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
toolchain:
|
|
|
|
- name: "RISCV 64bit"
|
|
|
|
host: "riscv64-linux-gnu"
|
|
|
|
packages: "python3 gperf g++-riscv64-linux-gnu"
|
|
|
|
- name: "ARM v7"
|
|
|
|
host: "arm-linux-gnueabihf"
|
|
|
|
packages: "python3 gperf g++-arm-linux-gnueabihf"
|
|
|
|
- name: "ARM v8"
|
|
|
|
host: "aarch64-linux-gnu"
|
|
|
|
packages: "python3 gperf g++-aarch64-linux-gnu"
|
|
|
|
- name: "i686 Win"
|
|
|
|
host: "i686-w64-mingw32"
|
|
|
|
packages: "python3 g++-mingw-w64-i686 qttools5-dev-tools"
|
|
|
|
- name: "i686 Linux"
|
|
|
|
host: "i686-pc-linux-gnu"
|
|
|
|
packages: "gperf cmake g++-multilib python3-zmq"
|
|
|
|
- name: "Win64"
|
|
|
|
host: "x86_64-w64-mingw32"
|
|
|
|
packages: "cmake python3 g++-mingw-w64-x86-64 qttools5-dev-tools"
|
|
|
|
- name: "x86_64 Linux"
|
|
|
|
host: "x86_64-unknown-linux-gnu"
|
|
|
|
packages: "gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
|
2022-05-05 12:41:05 +00:00
|
|
|
- name: "Cross-Mac x86_64"
|
2020-12-10 03:08:58 +00:00
|
|
|
host: "x86_64-apple-darwin11"
|
|
|
|
packages: "cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
|
2022-05-05 12:41:05 +00:00
|
|
|
- name: "Cross-Mac aarch64"
|
|
|
|
host: "aarch64-apple-darwin11"
|
|
|
|
packages: "cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
|
2020-12-10 03:08:58 +00:00
|
|
|
- name: "x86_64 Freebsd"
|
|
|
|
host: "x86_64-unknown-freebsd"
|
|
|
|
packages: "clang-8 gperf cmake python3-zmq libdbus-1-dev libharfbuzz-dev"
|
|
|
|
name: ${{ matrix.toolchain.name }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-07-10 12:56:41 +00:00
|
|
|
# Most volatile cache
|
2020-12-10 03:08:58 +00:00
|
|
|
- name: ccache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2021-07-10 12:56:41 +00:00
|
|
|
path: ~/.ccache
|
2020-12-10 03:08:58 +00:00
|
|
|
key: ccache-${{ matrix.toolchain.host }}-${{ github.sha }}
|
|
|
|
restore-keys: ccache-${{ matrix.toolchain.host }}-
|
2021-07-10 12:56:41 +00:00
|
|
|
# Less volatile cache
|
|
|
|
- name: depends cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: contrib/depends/built
|
|
|
|
key: depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
|
|
|
restore-keys: |
|
|
|
|
depends-${{ matrix.toolchain.host }}-${{ hashFiles('contrib/depends/packages/*') }}
|
|
|
|
depends-${{ matrix.toolchain.host }}-
|
|
|
|
# Static cache
|
|
|
|
- name: OSX SDK cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: contrib/depends/sdk-sources
|
|
|
|
key: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
|
|
|
|
restore-keys: sdk-${{ matrix.toolchain.host }}-${{ matrix.toolchain.osx_sdk }}
|
2020-12-10 03:08:58 +00:00
|
|
|
- name: set apt conf
|
2021-09-09 10:57:24 +00:00
|
|
|
run: ${{env.APT_SET_CONF}}
|
2020-12-10 03:08:58 +00:00
|
|
|
- name: install dependencies
|
2020-12-20 07:27:10 +00:00
|
|
|
run: sudo apt update; sudo apt -y install build-essential libtool cmake autotools-dev automake pkg-config bsdmainutils curl git ca-certificates ccache ${{ matrix.toolchain.packages }}
|
2020-12-10 03:08:58 +00:00
|
|
|
- name: prepare w64-mingw32
|
|
|
|
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'i686-w64-mingw32' }}
|
|
|
|
run: |
|
|
|
|
sudo update-alternatives --set ${{ matrix.toolchain.host }}-g++ $(which ${{ matrix.toolchain.host }}-g++-posix)
|
|
|
|
sudo update-alternatives --set ${{ matrix.toolchain.host }}-gcc $(which ${{ matrix.toolchain.host }}-gcc-posix)
|
|
|
|
- name: build
|
|
|
|
run: |
|
2021-09-09 10:57:24 +00:00
|
|
|
${{env.CCACHE_SETTINGS}}
|
2020-12-10 03:08:58 +00:00
|
|
|
make depends target=${{ matrix.toolchain.host }} -j2
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: ${{ matrix.toolchain.host == 'x86_64-w64-mingw32' || matrix.toolchain.host == 'x86_64-apple-darwin11' || matrix.toolchain.host == 'x86_64-unknown-linux-gnu' }}
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.toolchain.name }}
|
|
|
|
path: |
|
|
|
|
/home/runner/work/monero/monero/build/${{ matrix.toolchain.host }}/release/bin/monero-wallet-cli*
|
|
|
|
/home/runner/work/monero/monero/build/${{ matrix.toolchain.host }}/release/bin/monerod*
|