Skip to content

Commit

Permalink
SKA-462: add workflows + actions for public github repo (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
VKyllianAubry authored and GitHub Enterprise committed Apr 26, 2024
1 parent 6227032 commit ab5632d
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/actions/build-cmake-preset/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: build CMake preset
description: Build the given SIL Kit Adapters CMake preset

inputs:
preset-name:
description: "The preset name from CMakePresets.json."
required: true
cmake-args:
description: "Additional CMake arguments"
required: false

runs:
using: composite
steps:

- name: Setup host
if: runner.os == 'Linux'
run: sudo apt install -y ninja-build
id: setup-host-linux
shell: bash

- name: Configure ${{ inputs.preset-name }}
run: cmake --preset ${{ inputs.preset-name }} ${{ inputs.cmake-args }}
id: cmake-configure
shell: bash

- name: Build ${{ inputs.preset-name }}
id: cmake-build
run: cmake --build --preset ${{ inputs.preset-name }}
shell: bash

- name: Pack ${{ inputs.preset-name }}
id: cmake-pack
run: cmake --build --preset ${{ inputs.preset-name }} --target package
shell: bash
29 changes: 29 additions & 0 deletions .github/workflows/build-linux-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Linux Release Build'

on:
push:
tags:
- "v*.*.*"

jobs:
linux-release:
name: Build SIL Kit GLIO for Release configuration
environment: public-github-runners
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Build
uses: ./.github/actions/build-cmake-preset
with:
preset-name: linux-release
cmake-args: "-D PACKAGE_FILENAME_SUFFIX=-${{ github.ref_name }}-ubuntu-20.04-x86_64-gcc"
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: true
draft: true
files: |
_build/linux-release/SilKit-Adapters*.zip
23 changes: 23 additions & 0 deletions .github/workflows/repo-sync-public.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
branches:
- 'main'
jobs:
sync_main_branch:
name: Sync branch to remote public GitHub
runs-on:
group: shared-runners
labels: Linux
environment: repo-sync-action/public-github
steps:
- uses: actions/checkout@v3
with:
clean: true
fetch-depth: 0
- uses: vector-actions/repo-sync-action@main
with:
app-key: ${{ secrets.APP_KEY }}
app-id: ${{ secrets.APP_ID }}
remote-repo-url: ${{ secrets.REMOTE_REPO_URL }}
remote-branch: ${{ secrets.REMOTE_BRANCH }}
local-branch: origin/main

0 comments on commit ab5632d

Please sign in to comment.