Update CI modified by IA #157
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI for GDCEF Godot 4.x | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- godot-4.x | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- godot-4.x | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- os: macos-14 | ||
name: MacOS | ||
os_name: macos | ||
check_files: cef_artifacts/libgdcef.dylib | ||
- os: ubuntu-20.04 | ||
name: Linux | ||
os_name: linux | ||
check_files: cef_artifacts/gdCefRenderProcess cef_artifacts/libgdcef.so cef_artifacts/libcef.so | ||
packages: sudo apt-get update | ||
- os: windows-2022 | ||
name: Windows | ||
os_name: windows | ||
check_files: \a\gdcef\gdcef\cef_artifacts\gdCefRenderProcess.exe \a\gdcef\gdcef\cef_artifacts\libgdcef.dll \a\gdcef\gdcef\cef_artifacts\libcef.dll | ||
shell: powershell | ||
name: Build on ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Setup MSVC (Windows only) | ||
if: matrix.os == 'windows-2022' | ||
uses: ilammy/msvc-dev-cmd@v1.10.0 | ||
- name: Checkout GDCEF | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: godot-4.x | ||
submodules: true | ||
- name: Get version | ||
id: version | ||
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT | ||
- name: Install system packages | ||
shell: ${{ matrix.shell || 'bash' }} | ||
Check failure on line 53 in .github/workflows/ci.yml GitHub Actions / CI for GDCEF Godot 4.xInvalid workflow file
|
||
run: | | ||
${{ matrix.packages || '' }} | ||
${{ matrix.os == 'macos-14' && 'brew install ninja' || '' }} | ||
cd addons/gdcef | ||
python3 -m pip install -r requirements.txt | ||
- name: Install python packages (MacOS only) | ||
if: matrix.os == 'macos-14' | ||
uses: getsentry/action-setup-venv@v2.1.0 | ||
with: | ||
python-version: 3.10.7 | ||
cache-dependency-path: addons/gdcef/requirements.txt | ||
install-cmd: pip install -r addons/gdcef/requirements.txt | ||
- name: Compile GDCEF | ||
shell: ${{ matrix.shell || 'bash' }} | ||
run: | | ||
cd addons/gdcef | ||
python3 build.py | ||
- name: Set archive name | ||
id: archive | ||
shell: bash | ||
run: echo "tarball_name=gdcef-artifacts-${{ steps.version.outputs.version }}-godot_4-${{ matrix.os_name }}_${{ runner.arch }}.tar.gz" >> $GITHUB_OUTPUT | ||
- name: Check build | ||
shell: ${{ matrix.shell || 'bash' }} | ||
run: | | ||
${{ matrix.os == 'windows-2022' && 'cd cef_artifacts' || '' }} | ||
${{ matrix.os == 'windows-2022' && 'Test-Path -Path ' || 'ls ' }}${{ matrix.check_files }} | ||
${{ matrix.os == 'windows-2022' && 'cd -' || '' }} | ||
tar -czvf ${{ steps.archive.outputs.tarball_name }} cef_artifacts | ||
- name: Upload artifact | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.archive.outputs.tarball_name }} | ||
path: ${{ steps.archive.outputs.tarball_name }} | ||
release: | ||
needs: build | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v4 | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "**/*.tar.gz" | ||
allowUpdates: true | ||
makeLatest: true |