707b5b07ee
feat: ci caching for faster builds
89 lines
3.0 KiB
YAML
89 lines
3.0 KiB
YAML
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
partial: false
|
|
recursive: true
|
|
|
|
labels:
|
|
platform: linux/amd64
|
|
|
|
when:
|
|
- event: tag
|
|
|
|
steps:
|
|
- name: patch monero and cache depends
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- cd monero && git submodule update --init --force && cd ..
|
|
- ./apply_patches.sh
|
|
- cd monero/contrib/depends
|
|
- for i in sources built; do cp "/root/.cache/$i" . -r || true; done
|
|
- make download
|
|
volumes:
|
|
- /opt/cache/monero_c/dotcache:/root/.cache
|
|
- name: x86_64-w64-mingw32
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- apt update
|
|
- apt install -y gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gperf libtinfo5
|
|
- ./build_single.sh x86_64-w64-mingw32 -j$(nproc)
|
|
- name: i686-w64-mingw32
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- apt update
|
|
- apt install -y gcc-mingw-w64-i686 g++-mingw-w64-i686 gperf libtinfo5
|
|
- ./build_single.sh i686-w64-mingw32 -j$(nproc)
|
|
- name: x86_64-linux-gnu
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- apt update
|
|
- apt install -y gcc g++ gperf
|
|
- ./build_single.sh x86_64-linux-gnu -j$(nproc)
|
|
- name: i686-linux-gnu
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- apt update
|
|
- apt install -y gcc-i686-linux-gnu g++-i686-linux-gnu gperf
|
|
- ./build_single.sh i686-linux-gnu -j$(nproc)
|
|
- name: aarch64-linux-gnu
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- apt update
|
|
- apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gperf
|
|
- ./build_single.sh aarch64-linux-gnu -j$(nproc)
|
|
- name: x86_64-linux-android
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- apt update
|
|
- apt install -y libtinfo5 gperf
|
|
- ./build_single.sh x86_64-linux-android -j$(nproc)
|
|
- name: aarch64-linux-android
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- apt update
|
|
- apt install -y libtinfo5 gperf
|
|
- ./build_single.sh aarch64-linux-android -j$(nproc)
|
|
- name: arm-linux-androideabi
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- apt update
|
|
- apt install -y libtinfo5 gperf
|
|
- ./build_single.sh arm-linux-androideabi -j$(nproc)
|
|
- name: cache depends
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:buster
|
|
commands:
|
|
- cd monero/contrib/depends
|
|
- for i in sources built; do cp "$i" "/root/.cache/" -r || true; done
|
|
volumes:
|
|
- /opt/cache/monero_c/dotcache:/root/.cache
|
|
- name: upload artifact
|
|
image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
|
|
commands:
|
|
- rm -rf ~/.ssh || true
|
|
- mkdir -p ~/.ssh
|
|
- echo "$${SSH_PRIVKEY}" > ~/.ssh/id_rsa
|
|
- chmod 700 ~/.ssh
|
|
- chmod 600 ~/.ssh/id_rsa
|
|
- rsync --mkpath -e "ssh -o StrictHostKeyChecking=no" -raz release/* $${SSH_HOST}:"$${SSH_BASE_PATH}/$(git describe --tags)/"
|
|
secrets: [ ssh_privkey, ssh_host, ssh_base_path ] |