mirror of
				https://github.com/pocketpy/pocketpy
				synced 2025-10-27 15:00:18 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			93 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			93 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: build dylib
 | |
| on:
 | |
|   push:
 | |
|     branches: [ main ]
 | |
|     paths-ignore:
 | |
|       - 'docs/**'
 | |
|       - 'web/**'
 | |
|       - '**.md'
 | |
|   pull_request:
 | |
|     paths-ignore:
 | |
|       - 'docs/**'
 | |
|       - 'web/**'
 | |
|       - '**.md'
 | |
| 
 | |
| jobs:
 | |
|   build_win:
 | |
|     runs-on: windows-latest
 | |
|     steps:
 | |
|     - uses: actions/checkout@v3
 | |
|     - uses: ilammy/msvc-dev-cmd@v1
 | |
|     - name: Compile
 | |
|       shell: powershell
 | |
|       run: |
 | |
|         Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
 | |
|         mkdir -p output/windows/x86_64
 | |
|         cd dylib
 | |
|         xmake f -p windows -a x64
 | |
|         xmake
 | |
|         cp build/windows/x64/release/test.dll ../output/windows/x86_64
 | |
|     - uses: actions/upload-artifact@v3
 | |
|       with:
 | |
|         path: output
 | |
|   build_linux_android:
 | |
|     runs-on: ubuntu-latest
 | |
|     steps:
 | |
|     - uses: actions/checkout@v3
 | |
|     - name: Install xmake
 | |
|       run: |
 | |
|         wget https://xmake.io/shget.text -O - | bash
 | |
|         xmake --version
 | |
|     - name: Compile linux
 | |
|       run: |
 | |
|         mkdir -p output/linux/x86_64
 | |
|         cd dylib
 | |
|         xmake f -p linux -a x86_64
 | |
|         xmake
 | |
|         cp build/linux/x86_64/release/libtest.so ../output/linux/x86_64
 | |
|     - uses: android-actions/setup-android@v2
 | |
|     - uses: nttld/setup-ndk@v1
 | |
|       id: setup-ndk
 | |
|       with:
 | |
|         ndk-version: r25b
 | |
|         add-to-path: false
 | |
|         local-cache: true
 | |
|     - name: Compile android
 | |
|       run: |
 | |
|         mkdir -p output/android/armeabi-v7a
 | |
|         mkdir -p output/android/arm64-v8a
 | |
|         cd dylib
 | |
|         xmake f -p android -a armeabi-v7a --ndk=$ANDROID_NDK_HOME
 | |
|         xmake
 | |
|         cp build/android/armeabi-v7a/release/libtest.so ../output/android/armeabi-v7a
 | |
|         xmake f -p android -a arm64-v8a --ndk=$ANDROID_NDK_HOME
 | |
|         xmake
 | |
|         cp build/android/arm64-v8a/release/libtest.so ../output/android/arm64-v8a
 | |
|       env:
 | |
|         ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
 | |
|     - uses: actions/upload-artifact@v3
 | |
|       with:
 | |
|         path: output
 | |
|   build_macos:
 | |
|       runs-on: macos-latest
 | |
|       steps:
 | |
|       - uses: actions/checkout@v3
 | |
|       - name: Install xmake
 | |
|         run: |
 | |
|           wget https://xmake.io/shget.text -O - | bash
 | |
|           source ~/.xmake/profile
 | |
|           xmake --version
 | |
|       - name: Compile
 | |
|         run: |
 | |
|           source ~/.xmake/profile
 | |
|           mkdir -p output/macos/x86_64
 | |
|           cd dylib
 | |
|           xmake f -p macosx -a x86_64
 | |
|           xmake
 | |
|           cp build/macosx/x86_64/release/libtest.dylib ../output/macos/x86_64
 | |
|       - uses: actions/upload-artifact@v3
 | |
|         with:
 | |
|           path: output
 | |
| 
 | |
| 
 |