Skip to content

Add version information for psinode and psitest #1524

Add version information for psinode and psitest

Add version information for psinode and psitest #1524

Workflow file for this run

name: Ubuntu 20.04
on:
workflow_dispatch:
push:
branches:
- main
- "release/*"
pull_request:
types: [assigned, opened, synchronize, reopened, labeled]
env:
UBUNTU_2004_IMAGE: "ghcr.io/gofractally/psibase-builder-ubuntu-2004:b70111acc20bdc6990e756a855fdbf428112c059"
jobs:
ubuntu-2004-build:
name: Ubuntu 20.04 | Build
runs-on: ubuntu-latest
steps:
- name: Timestamp
id: ccache_cache_timestamp
run: echo timestamp=`date -u +"%Y-%m-%d-%H-%M-%S"` >>$GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
- name: Preserve ccache
uses: actions/cache@v3
with:
path: .caches
key: $ubuntu-20.04-caches-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
$ubuntu-20.04-caches-
- name: Build
run: |
set -e
echo =====
mkdir -p $HOME/.ssh
chmod 700 $HOME/.ssh
git submodule update --init --recursive
echo =====
export CCACHE_DIR=${GITHUB_WORKSPACE}/.caches/ccache
export SCCACHE_DIR=${GITHUB_WORKSPACE}/.caches/sccache
export CCACHE_CONFIGPATH=${GITHUB_WORKSPACE}/ccache.conf
echo max_size = 600M >${GITHUB_WORKSPACE}/ccache.conf
echo log_file = ${GITHUB_WORKSPACE}/ccache.log >>${GITHUB_WORKSPACE}/ccache.conf
export SCCACHE_CACHE_SIZE=200M
export RUSTC_WRAPPER=sccache
export LLVM_CONFIG_PATH=/opt/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/llvm-config
export LD_LIBRARY_PATH=/opt/clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04/lib/
export DOCKER="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} -e CCACHE_DIR -e CCACHE_CONFIGPATH -e SCCACHE_DIR -e SCCACHE_CACHE_SIZE -e RUSTC_WRAPPER -e LLVM_CONFIG_PATH -e LD_LIBRARY_PATH --user $(id -u):$(id -g) ${UBUNTU_2004_IMAGE}"
export DOCKER_ROOT="docker run --rm -v ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE} -w ${GITHUB_WORKSPACE} -e CCACHE_DIR -e CCACHE_CONFIGPATH -e SCCACHE_DIR -e SCCACHE_CACHE_SIZE -e RUSTC_WRAPPER -e LLVM_CONFIG_PATH -e LD_LIBRARY_PATH ${UBUNTU_2004_IMAGE}"
docker pull ${UBUNTU_2004_IMAGE}
echo =====
${DOCKER} ccache -s
echo =====
${DOCKER} sccache -s
echo =====
mkdir build
${DOCKER} bash -c "cd build && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_RELEASE_WASM=yes -DBUILD_DEBUG_WASM=yes -DBUILD_DOC=yes -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache .."
echo =====
${DOCKER} bash -c "cd build && make -j $(nproc)"
echo =====
${DOCKER} bash -c "cd build && ctest --output-on-failure -j $(nproc)"
echo =====
ls -la ${GITHUB_WORKSPACE}
echo =====
${DOCKER} ccache -s
echo =====
${DOCKER} sccache -s
echo =====
${DOCKER} bash -c "cd build && cpack -G TGZ -D CPACK_PACKAGE_FILE_NAME=psidk-ubuntu-2004"
echo =====
${DOCKER} bash -c "cd build && mv book psidk-book && tar czf ../psidk-book.tar.gz psidk-book"
- name: Upload psidk-ubuntu-2004
uses: actions/upload-artifact@v1
with:
name: psidk-ubuntu-2004
path: build/psidk-ubuntu-2004.tar.gz
- name: Upload psidk-book
uses: actions/upload-artifact@v1
with:
name: psidk-book
path: psidk-book.tar.gz