Skip to content

Commit

Permalink
First pass at release.yml action
Browse files Browse the repository at this point in the history
  • Loading branch information
isherman committed Jan 18, 2023
1 parent f324c98 commit ebc0605
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
branches: [main]
workflow_dispatch:

concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04] # TODO: macos-11
fail-fast: false
env:
GH_TOKEN: ${{ github.token }}

steps:
- uses: actions/checkout@v3

- uses: hendrikmuhs/ccache-action@v1
if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-11'

- name: Get short git SHA
id: sha
run: echo "GIT_SHA_SHORT=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Install system dependencies (Ubuntu)
run: ./scripts/install_deps_ubuntu.sh
if: matrix.os == 'ubuntu-20.04'

- name: Install system dependencies (Mac)
run: ./scripts/install_deps_mac.sh
if: matrix.os == 'macos-11'

- name: Install venv dependencies
run: ./bootstrap_venv.sh

- name: Create and upload release
run: |
TAG=v.$(git rev-parse --short HEAD)
git tag $TAG
git push origin $TAG
tar -czvf venv-${{ matrix.os }}.tar.gz venv
gh release create $TAG
gh release upload $TAG venv-${{ matrix.os }}.tar.gz
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
*~

# venv-related
build.venv
venv

# Prerequisites
*.d

Expand Down
4 changes: 3 additions & 1 deletion bootstrap_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ pip install -U pip
pip install -U wheel
pip install -U cmake ninja

FARM_NG_CMAKE_PATH="${1:-.}"

mkdir -p build.venv
cd build.venv
cmake \
-DFARM_NG_DEV_BUILD=On \
-Dfarm_ng_INSTALL_PREFIX=$DIR/venv \
-G Ninja \
$DIR/farm_ng_cmake
$DIR/$FARM_NG_CMAKE_PATH

ninja -v
25 changes: 25 additions & 0 deletions scripts/install_deps_mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

set -x # echo on
set -e # exit on error

brew install --verbose \
assimp \
boost \
catch2 \
ccache \
ceres-solver \
ffmpeg \
glew \
glog \
grpc \
libjpeg \
libpng \
libtiff \
lz4 \
opencv \
openexr \
openssl \
pre-commit \
protobuf \
zstd
41 changes: 41 additions & 0 deletions scripts/install_deps_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

set -x # echo on
set -e # exit on error

sudo apt-get -qq update

# Please keep this list sorted.
sudo apt-get -y install \
ccache \
clang \
clang-tidy \
cmake \
gfortran \
libassimp-dev \
libatlas-base-dev \
libavcodec-dev \
libavdevice-dev \
libavformat-dev \
libavutil-dev \
libboost-coroutine-dev \
libc++-dev \
libcrypto++-dev \
libegl1-mesa-dev \
libglew-dev \
libgoogle-glog-dev \
libgrpc-dev \
libgrpc++-dev \
libgtest-dev \
libopencv-dev \
libprotobuf-dev \
libssl-dev \
libsuitesparse-dev \
libswscale-dev \
libtiff-dev \
protobuf-compiler \
protobuf-compiler-grpc \
&& sudo apt-get clean


ls /usr/lib/x86_64-linux-gnu/libgrpc++*

0 comments on commit ebc0605

Please sign in to comment.