mirror of
https://github.com/taurusxin/ncmdump.git
synced 2025-07-15 14:02:09 +08:00
feat:add global variable for CI
This commit is contained in:
parent
70c463ab7e
commit
adfc56ef59
28
.github/workflows/autobuild.yml
vendored
28
.github/workflows/autobuild.yml
vendored
@ -1,5 +1,7 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
env:
|
||||||
|
BUILD_TYPE: Release
|
||||||
|
BUILD_PATH: build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
@ -22,16 +24,16 @@ jobs:
|
|||||||
install: git mingw-w64-ucrt-x86_64-toolchain
|
install: git mingw-w64-ucrt-x86_64-toolchain
|
||||||
|
|
||||||
- name: Configure build
|
- name: Configure build
|
||||||
run: cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -B build
|
run: cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -j 4
|
run: cmake --build ${{ env.BUILD_PATH }} -j 4
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Windows amd64 Build
|
name: Windows amd64 Build
|
||||||
path: build/ncmdump.exe
|
path: ${{ env.BUILD_PATH }}/ncmdump.exe
|
||||||
build_on_windows_msvc:
|
build_on_windows_msvc:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
@ -42,16 +44,16 @@ jobs:
|
|||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Configure build
|
- name: Configure build
|
||||||
run: cmake -DCMAKE_BUILD_TYPE=Release -B build
|
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -j 4
|
run: cmake --build ${{ env.BUILD_PATH }} -j 4
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Windows amd64 Build
|
name: Windows amd64 Build
|
||||||
path: build/ncmdump.exe
|
path: ${{ env.BUILD_PATH }}/ncmdump.exe
|
||||||
|
|
||||||
build_on_linux:
|
build_on_linux:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -68,16 +70,16 @@ jobs:
|
|||||||
sudo apt-get install -y build-essential cmake
|
sudo apt-get install -y build-essential cmake
|
||||||
|
|
||||||
- name: Configure build
|
- name: Configure build
|
||||||
run: cmake -DCMAKE_BUILD_TYPE=Release -B build
|
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -j 4
|
run: cmake --build ${{ env.BUILD_PATH }} -j 4
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Linux amd64 Build
|
name: Linux amd64 Build
|
||||||
path: build/ncmdump
|
path: ${{ env.BUILD_PATH }}/ncmdump
|
||||||
|
|
||||||
build_on_macos:
|
build_on_macos:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
@ -94,13 +96,13 @@ jobs:
|
|||||||
brew install git cmake
|
brew install git cmake
|
||||||
|
|
||||||
- name: Configure build
|
- name: Configure build
|
||||||
run: cmake -DCMAKE_BUILD_TYPE=Release -B build
|
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build -j 4
|
run: cmake --build ${{ env.BUILD_PATH }} -j 4
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: macOS amd64 Build
|
name: macOS amd64 Build
|
||||||
path: build/ncmdump
|
path: ${{ env.BUILD_PATH }}/ncmdump
|
Loading…
Reference in New Issue
Block a user