2024-05-11 15:18:05 +03:00
|
|
|
name: Emu third-party dependencies (Linux)
|
2024-05-11 01:20:33 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
# needed since it allows this to become a reusable workflow
|
|
|
|
workflow_dispatch:
|
|
|
|
# allows manual trigger
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
env:
|
2024-05-11 15:18:05 +03:00
|
|
|
DEPS_CACHE_KEY: emu-deps-linux
|
|
|
|
DEPS_CACHE_DIR: build/deps/linux
|
2024-05-11 01:20:33 +03:00
|
|
|
|
2024-05-11 15:18:05 +03:00
|
|
|
PACKAGE_BASE_DIR: "build/package/linux"
|
|
|
|
THIRD_PARTY_BASE_DIR: 'third-party'
|
|
|
|
|
2024-05-11 01:20:33 +03:00
|
|
|
jobs:
|
2024-05-11 04:54:56 +03:00
|
|
|
deps-build:
|
2024-05-11 15:18:05 +03:00
|
|
|
runs-on: ubuntu-22.04
|
2024-05-11 02:01:35 +03:00
|
|
|
if: ${{ !cancelled() }}
|
2024-05-11 01:20:33 +03:00
|
|
|
|
2024-05-11 15:18:05 +03:00
|
|
|
steps:
|
2024-05-11 01:20:33 +03:00
|
|
|
- name: Lookup cache for deps
|
|
|
|
id: emu-deps-cache-step
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
key: ${{ env.DEPS_CACHE_KEY }}
|
|
|
|
path: ${{ env.DEPS_CACHE_DIR }}
|
|
|
|
|
|
|
|
# we need branch because it has build scripts
|
|
|
|
- name: Checkout branch
|
|
|
|
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2024-05-11 15:18:05 +03:00
|
|
|
- name: Clone third-party deps (deps/linux)
|
2024-05-11 01:20:33 +03:00
|
|
|
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
2024-05-11 15:18:05 +03:00
|
|
|
ref: 'third-party/deps/linux'
|
|
|
|
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/linux"
|
2024-05-11 01:20:33 +03:00
|
|
|
|
|
|
|
- name: Clone third-party deps (deps/common)
|
|
|
|
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
ref: 'third-party/deps/common'
|
|
|
|
path: "${{env.THIRD_PARTY_BASE_DIR}}/deps/common"
|
|
|
|
|
2024-05-11 15:18:05 +03:00
|
|
|
### fix folder permissions! not sure why this fails
|
|
|
|
# nested subdirs "build/linux/release" cause permission problems
|
2024-05-11 16:51:29 +03:00
|
|
|
- name: Give all permissions to repo folder
|
2024-05-11 01:20:33 +03:00
|
|
|
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
2024-05-11 15:18:05 +03:00
|
|
|
shell: bash
|
|
|
|
working-directory: ${{ github.workspace }}
|
|
|
|
run: sudo chmod -R 777 "${{ github.workspace }}"
|
2024-05-11 01:20:33 +03:00
|
|
|
|
|
|
|
- name: Build deps
|
|
|
|
if: steps.emu-deps-cache-step.outputs.cache-hit != 'true'
|
2024-05-11 15:18:05 +03:00
|
|
|
shell: bash
|
|
|
|
run: sudo chmod 777 build_linux_deps.sh && sudo ./build_linux_deps.sh -verbose
|