mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-24 06:46:40 +00:00
added workflow
This commit is contained in:
parent
a0d8ced80e
commit
e4f165636d
65
.github/workflows/build-publish.yaml
vendored
Normal file
65
.github/workflows/build-publish.yaml
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
name: Build and Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main # Adjust to your main branch name
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest # You can specify different OS and platforms here
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up CMake
|
||||||
|
uses: actions/setup-cmake@v2
|
||||||
|
with:
|
||||||
|
cmake-version: 3.x # Specify your desired CMake version
|
||||||
|
|
||||||
|
- name: Build and Test (Linux)
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
make
|
||||||
|
ctest
|
||||||
|
|
||||||
|
- name: Publish Artifact (Linux)
|
||||||
|
if: success()
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: my-library-linux
|
||||||
|
path: build/my-library # Adjust the path and artifact name
|
||||||
|
|
||||||
|
build-windows:
|
||||||
|
runs-on: windows-latest # You can specify different OS and platforms here
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up CMake
|
||||||
|
uses: actions/setup-cmake@v2
|
||||||
|
with:
|
||||||
|
cmake-version: 3.0 # cmake version
|
||||||
|
|
||||||
|
- name: Build and Test (Windows)
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --config Release
|
||||||
|
ctest
|
||||||
|
|
||||||
|
- name: Publish Artifact (Windows)
|
||||||
|
if: success()
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: my-library-windows
|
||||||
|
path: build/Release/my-library.exe # Adjust the path and artifact name
|
||||||
|
|
||||||
|
# Add similar steps for other platforms (e.g., macOS)
|
||||||
|
|
||||||
|
# Define deployment steps here to release your library artifacts
|
Loading…
Reference in New Issue
Block a user