Skip to content

update deps

update deps #954

Workflow file for this run

name: "Main workflow"
on: push
jobs:
configure:
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
outputs:
uid_gid: ${{ steps.get-user.outputs.uid_gid }}
steps:
- id: get-user
run: echo "uid_gid=$(id -u):$(id -g)" >> $GITHUB_OUTPUT
build:
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl protobuf-compiler build-essential git wget unzip python3 python3-pip \
libssl-dev libffi-dev libreadline-dev zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \
libgdbm-dev libnss3-dev liblzma-dev libxml2-dev libxmlsec1-dev libffi-dev libyaml-dev
- name: Install CMake 3.28
run: |
wget https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0-linux-x86_64.sh
sudo mkdir /opt/cmake
sudo sh cmake-3.28.0-linux-x86_64.sh --skip-license --prefix=/opt/cmake
sudo ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake
sudo ln -sf /opt/cmake/bin/ctest /usr/local/bin/ctest
- name: Verify CMake version
run: cmake --version
- run: make build
- name: Run C++ tests
run: make test
check_version:
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
outputs:
version: ${{ steps.get-version.outputs.version }}
exists: ${{ steps.get-version.outputs.exists }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- id: get-version
name: Get zxlib version
run: echo "version=$(./scripts/get_version.sh)" >> $GITHUB_OUTPUT
- id: tag-exists
name: Check if version exists
run: |
if git rev-parse ${{ steps.get-version.outputs.version }} >/dev/null 2>&1; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Fail if tag exists
if: ${{ steps.tag-exists.outputs.exists == 'true' }}
run: exit 1
tag:
runs-on: ${{ github.repository_owner == 'zondax' && 'zondax-runners' || 'ubuntu-latest' }}
needs:
- build
- check_version
if: ${{ needs.check_version.outputs.exists != 'true' && github.ref == 'refs/heads/main' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.check_version.outputs.version }}