Skip to content

add ci pipeline badge #58

add ci pipeline badge

add ci pipeline badge #58

Workflow file for this run

name: ci
on:
pull_request:
branches:
- master
push:
branches:
- master
workflow_dispatch:
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
container:
image: yanzhaowang/srs-env:fedora-41
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
- name: install and env vars
run: |
dnf install -y conan nodejs
cd $GITHUB_WORKSPACE/..
echo "PARENT_DIR=$PWD" >> $GITHUB_ENV
echo "CONAN_HOME=$PWD/.conan2" >> $GITHUB_ENV
- name: restore cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
${{ env.PARENT_DIR }}/.conan2
key: srs-cache
- name: build
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
cmake --preset default
cmake --build ./build -- -j2
gh cache delete ${{ steps.cache-restore.outputs.cache-primary-key }} || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: save cache
id: cache-save
uses: actions/cache/save@v4
with:
path: |
${{ env.PARENT_DIR }}/.conan2
key: ${{ steps.cache-restore.outputs.cache-primary-key }}