Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1nghz committed May 4, 2023
1 parent 27ae1e1 commit f856b8d
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,8 @@ jobs:
with:
submodules: 'recursive'

- name: Cache hiredis library
id: cache-hiredis
uses: actions/cache@v2
with:
path: ~/hiredis
key: hiredis-${{ runner.os }}-${{ hashFiles('vendor/hiredis/Makefile') }}

- name: Build and install hiredis library
if: steps.cache-hiredis.outputs.cache-hit != 'true'
run: |
cd vendor/hiredis
make
sudo make install PREFIX=~/hiredis
sudo ldconfig
- name: Set environment variables for hiredis
run: |
echo "HIREDIS_INCLUDE_DIR=$HOME/hiredis/include" >> $GITHUB_ENV
echo "HIREDIS_LIBRARY_DIR=$HOME/hiredis/lib" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=$HOME/hiredis/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Install hiredis library
run: sudo apt-get update && sudo apt-get install -y libhiredis-dev

- name: Build
run: make

0 comments on commit f856b8d

Please sign in to comment.