Skip to content

Commit

Permalink
Install deps (libboost-all-dev)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmilosevic committed Apr 10, 2024
1 parent 889c49d commit 12126b9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Install dependencies"
description: "Installs dependencies on GitHub Actions runners"

inputs:
os:
description: 'Runner OS'
required: true

runs:
using: "composite"
steps:
- name: Verify ubuntu only
shell: bash
run: |
if ! echo ${{ inputs.os }} | grep -q "ubuntu"; then
echo "${{ inputs.os }} does not seem to be ubuntu"
fi
- name: Assert requested os exists in dependencies
shell: bash
run: |
if ! jq -e ".\"${{ inputs.os }}\" != null" $GITHUB_ACTION_PATH/dependencies.json; then
echo "${{ inputs.os }} does not exist as a supported os in $GITHUB_ACTION_PATH/dependencies.json"
fi
- name: Retrieve and install pkg deps based on OS
id: retrieve-pkg-deps
shell: bash
run: |
DEPENDENCIES=$(jq -r --arg os "${{ inputs.os }}" '.[$os] | .[]' $GITHUB_ACTION_PATH/dependencies.json)
echo $DEPENDENCIES
sudo apt update
sudo apt install $DEPENDENCIES
11 changes: 11 additions & 0 deletions .github/actions/install-deps/dependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"ubuntu-22.04": [
"software-properties-common",
"build-essential",
"python3.10-venv",
"libyaml-cpp-dev",
"libboost-all-dev",
"libsndfile1",
"libhwloc-dev"
]
}
7 changes: 5 additions & 2 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ jobs:
strategy:
matrix:
arch: ["grayskull"]
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
os: ubuntu-22.04
- uses: actions/checkout@v4
- name: Update submodule
run: git submodule update --init --recursive
- name: Build for ${{ matrix.arch }}
Expand Down

0 comments on commit 12126b9

Please sign in to comment.