Skip to content

Commit

Permalink
Reuse Ocean's ebtree workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Geod24 committed Oct 2, 2023
1 parent fc48229 commit cd208a2
Showing 1 changed file with 5 additions and 26 deletions.
31 changes: 5 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ name: CI
on: [push, pull_request]

jobs:
setup-ebtree:
uses: sociomantic-tsunami/ocean/.github/workflows/[email protected]
with:
os: ubuntu-20.04
main:
name: Run
strategy:
Expand All @@ -21,40 +25,15 @@ jobs:

runs-on: ${{ matrix.os }}
timeout-minutes: 30
needs: setup-ebtree
steps:
- name: "Ensure tools/ exists"
run: mkdir -p ${{ github.workspace }}/tools/

- name: 'Restore ebtree from cache'
id: cache-ebtree
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/tools/
key: ebtree

- name: 'Checkout ebtree ${{ matrix.ebtree_version }}'
uses: actions/checkout@v2
if: steps.cache-ebtree.outputs.cache-hit != 'true'
with:
repository: sociomantic-tsunami/ebtree
ref: ${{ matrix.ebtree_version }}
# Relative to Github workspace
path: tools/ebtree

- name: 'Build ebtree ${{ matrix.ebtree_version }}'
if: steps.cache-ebtree.outputs.cache-hit != 'true'
run: |
# fpm is used to build the `.deb` and depends on ruby
sudo apt-get update
sudo apt-get install -y build-essential ruby ruby-dev
sudo gem install --no-document fpm
# Build the debian package
# Package lives in tools/ebtree/deb/libebtree6[-{dbg,dev}]_$VERSION-distro_arch.deb
# $VERSION is ${{ matrix.ebtree_version }} without the leading 'v'
# E.g. libebtree6[-{dbg,dev}]_6.0.socio10-bionic_amd64.deb
make -C '${{ github.workspace }}/tools/ebtree' deb
- name: Install dependencies
run: |
sudo apt-get update && \
Expand Down

0 comments on commit cd208a2

Please sign in to comment.