Add version information for psinode and psitest #328
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu 22.04 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- "release/*" | |
pull_request: | |
types: [assigned, opened, synchronize, reopened, labeled] | |
env: | |
UBUNTU_2204_IMAGE: "ghcr.io/gofractally/psibase-builder-ubuntu-2204:7e3c6e5739df95ba33943789d2cdf5472f91111a" | |
jobs: | |
ubuntu-2204-build: | |
name: Ubuntu 22.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-22.04-caches-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
restore-keys: | | |
$ubuntu-22.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 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 --user $(id -u):$(id -g) ${UBUNTU_2204_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 ${UBUNTU_2204_IMAGE}" | |
docker pull ${UBUNTU_2204_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} | |
ls -la ${GITHUB_WORKSPACE}/build/doc/psidk | |
echo ===== | |
${DOCKER} ccache -s | |
echo ===== | |
${DOCKER} sccache -s | |
echo ===== | |
${DOCKER} bash -c "cd build && cpack -G TGZ -D CPACK_PACKAGE_FILE_NAME=psidk-ubuntu-2204" | |
echo ===== | |
${DOCKER} bash -c "cd build && mv book psidk-book && tar czf ../psidk-book.tar.gz psidk-book" | |
- name: Upload psidk-ubuntu-2204 | |
uses: actions/upload-artifact@v1 | |
with: | |
name: psidk-ubuntu-2204 | |
path: build/psidk-ubuntu-2204.tar.gz | |
- name: Upload psidk-book | |
uses: actions/upload-artifact@v1 | |
with: | |
name: psidk-book | |
path: psidk-book.tar.gz |