Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rectalogic committed Oct 15, 2023
1 parent a3a32d0 commit 7579b52
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI
on:
push:
branches:
- '*'

jobs:

linux:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Buildx
uses: docker/build-push-action@v3
with:
push: false
context: builders/linux
tags: mediafx
load: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
# https://github.com/docker/build-push-action/issues/252
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Install mediaFX
run: builders/linux/docker-run.sh /mediafx/builders/linux/mediafx-build.sh

macos:
runs-on: macos-13
env:
XCODE_VER: 15.0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Xcode
run: |
sudo xcode-select -s "/Applications/Xcode_${XCODE_VER}.app"
- name: Restore cached installation
uses: actions/cache/restore@v3
id: restore-cache
with:
path: build/macos/installed
key: ${{ runner.os }}-${{ hashFiles('builders/macos/versions') }}-${{ env.XCODE_VER }}
- name: Build installation
if: steps.restore-cache.outputs.cache-hit != 'true'
run: |
builders/macos/install-qt6.sh
- name: Save cached installation
uses: actions/cache/save@v3
if: steps.restore-cache.outputs.cache-hit != 'true'
with:
path: build/macos/installed
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
- name: Install mediaFX
run: |
builders/macos/mediafx-build.sh
12 changes: 12 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: clang-format Check
on: [push, pull_request]
jobs:
formatting-check:
name: clang-format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/[email protected]
with:
clang-format-version: '15'

0 comments on commit 7579b52

Please sign in to comment.