Skip to content

Merge pull request #267 from letheanVPN/snyk-fix-811415492f48da7373a5… #260

Merge pull request #267 from letheanVPN/snyk-fix-811415492f48da7373a5…

Merge pull request #267 from letheanVPN/snyk-fix-811415492f48da7373a5… #260

Workflow file for this run

name: Linux
on:
push:
branches:
- 'main'
- 'dev'
- 'v*'
tags:
- 'v*'
paths-ignore:
- '**.md'
pull_request:
branches:
- 'main'
- 'dev'
- 'v*'
paths-ignore:
- '**.md'
# The below variables reduce repetitions across similar targets
env:
REMOVE_BUNDLED_BOOST : rm -rf /usr/local/share/boost
BUILD_DEFAULT_LINUX: |
make release-static-linux-x86_64-local-boost
APT_INSTALL_LINUX: 'sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev libprotobuf-dev protobuf-compiler ccache'
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
jobs:
ubuntu:
runs-on: ${{ matrix.os }}
env:
CCACHE_TEMPDIR: /tmp/.ccache-temp
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: actions/cache@v2
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-build-${{ matrix.os }}-${{ github.sha }}
restore-keys: ccache-${{ runner.os }}-build-${{ matrix.os }}
- name: remove bundled boost
run: ${{env.REMOVE_BUNDLED_BOOST}}
- name: set apt conf
run: ${{env.APT_SET_CONF}}
- name: update apt
run: sudo apt update
- name: install lethean dependencies
run: ${{env.APT_INSTALL_LINUX}}
- name: build
run: |
${{env.CCACHE_SETTINGS}}
${{env.BUILD_DEFAULT_LINUX}}
- run: LETHEAN_RELEASE=lethean-cli-linux make zip-release
- uses: actions/upload-artifact@v2
with:
name: linux.tar
path: ${{ github.workspace }}/build/lethean-cli-linux.tar
- name: Get the version
id: get_version
if: startsWith(github.ref, 'refs/tags/')
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ github.workspace }}/build/lethean-cli-linux.tar