Skip to content

Commit

Permalink
Refactor install gperf into separate github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Krämer committed Oct 1, 2024
1 parent 2c3a5f4 commit 216b28f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
21 changes: 21 additions & 0 deletions .github/actions/install-gperf/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Install gperf
description: Installs gperf on Linux, macOS, and Windows runners.
runs:
using: "composite"
steps:
- name: Install gperf on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y gperf
- name: Install gperf on macOS
if: runner.os == 'macOS'
run: |
brew update
brew install gperf
- name: Install gperf on Windows
if: runner.os == 'Windows'
run: |
choco install gperf --yes
18 changes: 2 additions & 16 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,8 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Install gperf on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y gperf
- name: Install gperf on macOS
if: runner.os == 'macOS'
run: |
brew update
brew install gperf
- name: Install gperf on Windows
if: runner.os == 'Windows'
run: |
choco install gperf --yes
- name: Install gperf
uses: ./.github/actions/install-gperf

- name: Verify gperf Installation
run: |
Expand Down

0 comments on commit 216b28f

Please sign in to comment.