Skip to content

Commit

Permalink
GitHub Actions: Add LICENSE to build artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
bakana808 committed Jan 16, 2025
1 parent bb38b67 commit ad49bb9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 28 deletions.
17 changes: 9 additions & 8 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ runs:
with:
distribution: temurin
java-version: 17

- name: Android - Remove existing Android SDK, and set up ENV vars
if: ${{ inputs.platform == 'android' }}
shell: sh
Expand All @@ -61,7 +60,7 @@ runs:
with:
packages: "ndk;${{ env.ANDROID_NDK_VERSION }} cmdline-tools;latest build-tools;34.0.0 platforms;android-34 cmake;3.22.1"
# Linux only
- name: Linux - dependencies
- name: Linux - Install dependencies
if: ${{ inputs.platform == 'linux' }}
shell: sh
run: |
Expand All @@ -88,14 +87,15 @@ runs:
run: |
emcc -v
# Windows only
- name: Windows - Install mingw64
- name: Windows - Set up mingw64
if: ${{ inputs.platform == 'windows' }}
shell: sh
run: |
sudo apt-get install mingw-w64
sudo apt-get install autotools-dev autoconf libtool-bin
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
# Dependencies of godot
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
Expand All @@ -105,14 +105,15 @@ runs:
python-version: "3.x"
# Optional - x64 or x86 architecture, defaults to x64
architecture: "x64"
- name: Setup scons

- name: Set up scons
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
scons --version
# Build
- name: Cache .scons_cache
- name: Set up cache
uses: actions/cache@v4
with:
path: |
Expand All @@ -125,8 +126,8 @@ runs:
${{ inputs.platform }}_${{ inputs.arch }}_${{ inputs.float-precision }}_
${{ inputs.platform }}_${{ inputs.arch }}_
${{ inputs.platform }}_
# Build gdextension
- name: Build GDExtension Debug Build
- name: Compile extension
shell: bash
env:
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -267,18 +267,7 @@ jobs:
with:
submodules: true

# Lint
#- name: Setup clang-format
# shell: bash
# run: |
# python -m pip install clang-format
#- name: Run clang-format
# shell: bash
# run: |
# clang-format src/** --dry-run --Werror

# Build
- name: 🔗 GDExtension Debug Build
- name: Compile extension
uses: ./.github/actions/build
with:
platform: ${{ matrix.platform }}
Expand All @@ -287,8 +276,7 @@ jobs:
build-target-type: ${{ matrix.target-type }}
host: ${{ matrix.host }}

# Sign
- name: Mac Sign
- name: MacOS - Sign
# Disable sign if secrets are not set
if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }}
env:
Expand All @@ -303,17 +291,18 @@ jobs:
APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }}
APPLE_DEV_APP_ID: ${{ secrets.APPLE_DEV_APP_ID }}

# - name: Windows - Delete compilation files
# if: ${{ matrix.platform == 'windows' }}
# shell: pwsh
# run: |
# Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
- name: Copy LICENSE to extension folder
shell: bash
run: |
mkdir -p "${{ github.workspace }}/artifact/addons/libm8gd/"
cp -a "${{ github.workspace }}/LICENSE" "${{ github.workspace }}/project/addons/libm8gd/." "${{ github.workspace }}/artifact/addons/libm8gd/"
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: libm8gd-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }}
path: |
${{ github.workspace }}/project/addons/libm8gd/**
${{ github.workspace }}/artifact
# Merges all the build artifacts together into a single godot-cpp-template artifact.
# If you comment out this step, all the builds will be uploaded individually.
Expand Down

0 comments on commit ad49bb9

Please sign in to comment.