mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-09-06 23:02:53 +02:00
setup github action for building
This commit is contained in:
parent
2a647d497a
commit
7c1bfc97c4
3 changed files with 62 additions and 16 deletions
41
.github/workflows/central-controller.yaml
vendored
Normal file
41
.github/workflows/central-controller.yaml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# on:
|
||||||
|
# workflow_dispatch:
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
central_controller:
|
||||||
|
name: Central Controller Build
|
||||||
|
runs-on: [gha-runner-x64, gha-runner-arm64]
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Get Date
|
||||||
|
id: get-date
|
||||||
|
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
|
||||||
|
shell: bash
|
||||||
|
- name: Cache Conda
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/miniconda3
|
||||||
|
key: ${{ runner.os }}-${{ runner.arch }}-${{ steps.get-date.outputs.today }}-conda-${{ hashFiles('**/environment.yml') }}
|
||||||
|
- name: Setup Miniconda
|
||||||
|
uses: conda-incubator/setup-miniconda@v3
|
||||||
|
with:
|
||||||
|
auto-update-conda: false
|
||||||
|
channel-priority: strict
|
||||||
|
activate-environment: central_controller
|
||||||
|
environment-file: environment.yml
|
||||||
|
use-only-tar-bz2: true
|
||||||
|
- name: Setup CMake
|
||||||
|
uses: threeal/cmake-action@v2.1.0
|
||||||
|
with:
|
||||||
|
options: |
|
||||||
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
|
-DZT1_CENTRAL_CONTROLLER=1
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build . --config Release -- -j 4
|
||||||
|
- name: SelfTest
|
||||||
|
run: |
|
||||||
|
./build/zerotier-selftest
|
19
environment.yml
Normal file
19
environment.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: central_controller
|
||||||
|
channels:
|
||||||
|
- conda-forge
|
||||||
|
dependencies:
|
||||||
|
- conda-forge::cmake=3.27.4
|
||||||
|
- conda-forge::git
|
||||||
|
- conda-forge::cxx-compiler
|
||||||
|
- conda-forge::c-compiler
|
||||||
|
- conda-forge::make
|
||||||
|
- conda-forge::pkg-config
|
||||||
|
- conda-forge::libpqxx=7.7.3
|
||||||
|
- conda-forge::libopentelemetry-cpp=1.21.0
|
||||||
|
- conda-forge::libopentelemetry-cpp-headers=1.21.0
|
||||||
|
- conda-forge::google-cloud-cpp=2.39.0
|
||||||
|
- conda-forge::libgoogle-cloud=2.39.0
|
||||||
|
- conda-forge::rust=1.89.0
|
||||||
|
- conda-forge::inja=3.3.0
|
||||||
|
- conda-forge::libhiredis=1.3.0
|
||||||
|
- conda-forge::nlohmann_json=3.12.0
|
|
@ -25,22 +25,8 @@ conda config --set channel_priority strict
|
||||||
Install external dependencies:
|
Install external dependencies:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
conda install -y -c conda-forge \
|
conda env create -f environment.yaml
|
||||||
conda-forge::cmake \
|
conda env activate central_controller
|
||||||
conda-forge::git \
|
|
||||||
conda-forge::cxx-compiler \
|
|
||||||
conda-forge::c-compiler \
|
|
||||||
conda-forge::make \
|
|
||||||
conda-forge::pkg-config \
|
|
||||||
conda-forge::libpqxx=7.7.3 \
|
|
||||||
conda-forge::libopentelemetry-cpp=1.21.0 \
|
|
||||||
conda-forge::libopentelemetry-cpp-headers=1.21.0 \
|
|
||||||
conda-forge::google-cloud-cpp=2.39.0 \
|
|
||||||
conda-forge::libgoogle-cloud=2.39.0 \
|
|
||||||
conda-forge::rust=1.89.0 \
|
|
||||||
conda-forge::inja=3.3.0 \
|
|
||||||
conda-forge::libhiredis=1.3.0 \
|
|
||||||
conda-forge::nlohmann_json=3.12.0
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build the Central Controller Binary
|
## Build the Central Controller Binary
|
||||||
|
|
Loading…
Add table
Reference in a new issue