gbe_fork/.github/workflows/gen_emu_config-build-linux.yml

53 lines
1.4 KiB
YAML
Raw Normal View History

2024-05-11 21:51:29 +08:00
name: Build gen_emu_config script (Linux)
on:
2024-05-11 21:51:29 +08:00
workflow_call:
# needed since it allows this to become a reusable workflow
workflow_dispatch:
# allows manual trigger
permissions:
contents: write
env:
ARTIFACT_NAME: "generate_emu_config-linux-${{ github.sha }}"
SCRIPT_BASE_DIR: "tools/generate_emu_config"
2024-05-11 21:51:29 +08:00
PACKAGE_BASE_DIR: "tools/generate_emu_config/bin/linux"
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout branch
uses: actions/checkout@v4
### fix folder permissions! not sure why this fails
# nested subdirs "build/linux/release" cause permission problems
2024-05-11 21:51:29 +08:00
- name: Give all permissions to repo folder
shell: bash
working-directory: ${{ github.workspace }}
run: sudo chmod -R 777 "${{ github.workspace }}"
2024-05-11 21:51:29 +08:00
# env
- name: Install env
shell: bash
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
2024-05-11 21:52:52 +08:00
run: sudo chmod 777 recreate_venv_linux.sh && sudo ./recreate_venv_linux.sh
2024-01-01 01:53:11 +08:00
# build
- name: Rebuild
shell: bash
working-directory: "${{ env.SCRIPT_BASE_DIR }}"
2024-05-11 21:52:52 +08:00
run: sudo chmod 777 rebuild_linux.sh && ./rebuild_linux.sh
2024-01-01 01:53:11 +08:00
# upload artifact
- name: Upload build package
uses: actions/upload-artifact@v4
with:
name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.PACKAGE_BASE_DIR }}/"
if-no-files-found: 'error'
compression-level: 9
retention-days: 1