Skip to content

Commit

Permalink
add auto release action
Browse files Browse the repository at this point in the history
1

123

sdf

12312

123

test

qweqwe
  • Loading branch information
yonielwest committed Feb 22, 2024
1 parent 5efd8a4 commit 4dab284
Show file tree
Hide file tree
Showing 3 changed files with 123 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages
name: Build Website

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
Expand Down
120 changes: 120 additions & 0 deletions .github/workflows/cmake-multi-platform-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Release Multi Platform
on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build-linux-clang:
name: Linux (Clang)
runs-on: ubuntu-latest
timeout-minutes: 15
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev libglfw3-dev
- name: Configure
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

- name: Create zip
run: zip -r gpupixel_linux_amd64.zip ${{github.workspace}}/output

- name: Upload library
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./gpupixel_linux_amd64.zip
asset_name: gpupixel_linux_amd64.zip
asset_content_type: application/gzip

build-macos-clang:
name: macOS (Universal)
runs-on: macos-latest
timeout-minutes: 15
env:
BUILD_TYPE: Release
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
steps:
- uses: actions/checkout@v4

- name: Configure
run: cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchain/ios.toolchain.cmake -DPLATFORM=MAC_UNIVERSAL -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S ${{ github.workspace }}/src
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

build-ios-clang:
name: iOS (Arm64)
runs-on: macos-latest
timeout-minutes: 15
env:
BUILD_TYPE: Release
CMAKE_OSX_ARCHITECTURES: x86_64;arm64
steps:
- uses: actions/checkout@v4

- name: Configure
run: cmake -G Xcode -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/toolchain/ios.toolchain.cmake -DPLATFORM=OS64 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S ${{ github.workspace }}/src
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

build-windows-mingw:
name: Windows (MSYS2)
runs-on: windows-latest
timeout-minutes: 15
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4

- name: Set up MinGW
uses: msys2/setup-msys2@v2

- name: Configure
run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build Win shared x64 library
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

build-android-gradle:
name: Android (Arm64-v8a)
runs-on: ubuntu-latest
timeout-minutes: 15
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v4
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: gradle

- name: Grant execute permission for gradlew
working-directory: src/android/java
run: chmod +x gradlew
- name: Build with Gradle
working-directory: src/android/java
run: ./gradlew assemble

3 changes: 2 additions & 1 deletion .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@ jobs:
run: chmod +x gradlew
- name: Build with Gradle
working-directory: src/android/java
run: ./gradlew assemble
run: ./gradlew assemble

0 comments on commit 4dab284

Please sign in to comment.