Skip to content

fix github action

fix github action #45

Workflow file for this run

name: build
on: push
jobs:
osx:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Build
run: |
./build_osx.sh
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./Plugins/**/*
name: tolua-osx
compression-level: 0
ios:
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Build
run: |
./build_ios.sh
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./Plugins/**/*
name: tolua-ios
compression-level: 0
window:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Build
run: |
# ./build_win32.sh
./build_win64.sh
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./Plugins/**/*
name: tolua-win
compression-level: 0
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: |
# ./build_win32.sh
./build_ubuntu.sh
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./Plugins/**/*
name: tolua-linux
compression-level: 0
ohos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install OHOS SDK
run: |
cd ~
curl -O https://repo.huaweicloud.com/harmonyos/os/4.1-Release/ohos-sdk-windows_linux-public.tar.gz
tar xvfz ohos-sdk-windows_linux-public.tar.gz
cd ohos-sdk/linux
unzip -o -d ./ native-linux-x64-4.1.7.5-Release.zip
# 安装32位依赖
sudo apt-get install gcc-multilib
- name: Build arm64
run: |
chmod +x build_ohos_arm64.sh
export OHOS_SDK=~/ohos-sdk/linux
./build_ohos_arm64.sh
- name: Build arm
run: |
chmod +x build_ohos_arm.sh
export OHOS_SDK=~/ohos-sdk/linux
./build_ohos_arm.sh
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./Plugins/**/*
name: tolua-ohos
compression-level: 0
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install NDK r15c
run: |
wget -O NDK -q https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
sudo apt install unzip -y
unzip -q NDK
sudo apt-get install libncurses5
- name: Build arm64
run: |
export ANDROID_NDK_HOME=$(pwd)/android-ndk-r15c
chmod 777 ./build_arm64.sh
./build_arm64.sh
- name: Install NDK r10e
run: |
wget -O NDK -q https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
sudo apt install unzip -y
unzip -q NDK
# sudo apt-get install libncurses5:i386
sudo apt-get install gcc-multilib
- name: Build arm
run: |
export ANDROID_NDK_HOME=$(pwd)/android-ndk-r10e
chmod 777 ./build_arm.sh
./build_arm.sh
- name: Upload
uses: actions/upload-artifact@v4
with:
path: ./Plugins/**/*
name: tolua-android
compression-level: 0
publish:
runs-on: ubuntu-latest
needs: [osx, ios, window, linux, ohos, android]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
name: download all artifacts
with:
path: tolua
pattern: tolua-*
merge-multiple: true
- run: ls -R tolua
- name: 'Tar files'
run: tar -cvf tolua_runtime.tar tolua/
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
files: |
tolua.tar