2023-12-16 17:50:30 +02:00
|
|
|
name: Generate emu config script (Linux)
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-12-16 17:35:56 +02:00
|
|
|
branches: [
|
2023-12-17 01:58:52 +02:00
|
|
|
"ci-build-gen-linux*",
|
2023-12-16 17:35:56 +02:00
|
|
|
"ci-build-all"
|
|
|
|
]
|
2023-12-17 01:58:52 +02:00
|
|
|
tags:
|
|
|
|
- release*
|
2023-12-16 17:35:56 +02:00
|
|
|
pull_request:
|
|
|
|
branches: [ "dev" ]
|
2023-12-17 01:58:52 +02:00
|
|
|
workflow_dispatch:
|
2023-12-20 15:07:01 +02:00
|
|
|
# allows manual trigger
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
permissions:
|
2023-12-17 01:58:52 +02:00
|
|
|
contents: write
|
|
|
|
|
|
|
|
env:
|
|
|
|
ARTIFACT_NAME: "generate_emu_config-linux-${{ github.sha }}"
|
2023-12-28 02:15:39 +02:00
|
|
|
SCRIPT_BASE_DIR: "tools/generate_emu_config"
|
|
|
|
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/package/linux"
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2023-12-16 09:55:36 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
steps:
|
2023-12-16 07:25:21 +02:00
|
|
|
- name: Checkout branch
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2023-12-26 21:19:45 +02:00
|
|
|
### fix folder permissions! not sure why this fails
|
|
|
|
# nested subdirs "build/linux/release" cause permission problems
|
|
|
|
- name: Give all permissions for repo folder
|
|
|
|
shell: bash
|
|
|
|
working-directory: ${{ github.workspace }}
|
|
|
|
run: sudo chmod -R 777 "${{ github.workspace }}"
|
|
|
|
|
2023-12-16 07:20:05 +02:00
|
|
|
- name: Install dependencies
|
2023-12-16 09:55:36 +02:00
|
|
|
shell: bash
|
2023-12-26 02:14:37 +02:00
|
|
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
2023-12-16 09:59:59 +02:00
|
|
|
run: sudo chmod 77 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
|
2023-12-16 07:20:05 +02:00
|
|
|
|
|
|
|
- name: Rebuild
|
2023-12-16 09:55:36 +02:00
|
|
|
shell: bash
|
2023-12-26 02:14:37 +02:00
|
|
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
2023-12-16 09:59:59 +02:00
|
|
|
run: sudo chmod 77 rebuild_linux.sh && sudo ./rebuild_linux.sh
|
2023-12-16 07:20:05 +02:00
|
|
|
|
2023-12-17 01:58:52 +02:00
|
|
|
- name: Package build
|
|
|
|
shell: bash
|
2023-12-26 02:14:37 +02:00
|
|
|
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
|
2023-12-17 01:58:52 +02:00
|
|
|
run: sudo chmod 77 package_linux.sh && sudo ./package_linux.sh
|
|
|
|
|
|
|
|
- name: Upload build package
|
2023-12-16 07:20:05 +02:00
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2023-12-17 01:58:52 +02:00
|
|
|
name: "${{ env.ARTIFACT_NAME }}"
|
2023-12-28 02:15:39 +02:00
|
|
|
path: "${{ env.PACKAGE_BASE_DIR }}/"
|
2023-12-16 07:20:05 +02:00
|
|
|
if-no-files-found: 'error'
|
|
|
|
compression-level: 9
|
2023-12-16 17:35:20 +02:00
|
|
|
retention-days: 1
|
2023-12-17 01:58:52 +02:00
|
|
|
|
|
|
|
- name: Release
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
2023-12-26 02:14:37 +02:00
|
|
|
files: "${{ env.PACKAGE_BASE_DIR }}/**/*"
|
2023-12-16 07:20:05 +02:00
|
|
|
|