2023-01-13 12:07:20 +00:00
|
|
|
on: [ push ]
|
2022-12-13 15:49:08 +00:00
|
|
|
|
2022-12-12 08:44:31 +00:00
|
|
|
jobs:
|
|
|
|
build_ubuntu:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-12-14 18:10:08 +00:00
|
|
|
- name: gitconfig
|
|
|
|
run: |
|
2023-03-07 21:50:34 +00:00
|
|
|
git config --global core.autocrlf input
|
|
|
|
# git config --global core.eol lf
|
2022-12-14 18:10:08 +00:00
|
|
|
- name: checkout
|
2024-09-10 18:52:49 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-12-14 18:10:08 +00:00
|
|
|
- name: Install Rust
|
2024-09-10 18:52:49 +00:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2022-12-14 18:10:08 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2024-09-10 18:52:49 +00:00
|
|
|
targets: x86_64-unknown-linux-gnu
|
2022-12-14 18:10:08 +00:00
|
|
|
components: rustfmt, clippy
|
2022-12-13 15:49:08 +00:00
|
|
|
|
2022-12-14 18:10:08 +00:00
|
|
|
- name: Set up cargo cache
|
2023-05-01 23:30:22 +00:00
|
|
|
uses: Swatinem/rust-cache@v2
|
2022-12-14 18:10:08 +00:00
|
|
|
continue-on-error: false
|
|
|
|
with:
|
2023-08-04 22:38:49 +00:00
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
|
2023-05-01 23:30:22 +00:00
|
|
|
shared-key: ${{ runner.os }}-cargo-
|
|
|
|
workspaces: |
|
2023-08-04 22:38:49 +00:00
|
|
|
rustybits/
|
2023-05-01 23:30:22 +00:00
|
|
|
|
2022-12-14 18:10:08 +00:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: selftest
|
|
|
|
run: |
|
|
|
|
make selftest
|
|
|
|
./zerotier-selftest
|
2024-09-10 18:52:49 +00:00
|
|
|
- name: Archive production artifacts
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: zerotier-one-ubuntu-x64
|
|
|
|
path: zerotier-one
|
|
|
|
retention-days: 7
|
2022-12-12 08:44:31 +00:00
|
|
|
|
2022-12-13 15:16:17 +00:00
|
|
|
build_macos:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2022-12-14 18:10:08 +00:00
|
|
|
- name: gitconfig
|
|
|
|
run: |
|
2023-03-07 21:50:34 +00:00
|
|
|
git config --global core.autocrlf input
|
|
|
|
# git config --global core.eol lf
|
2022-12-13 15:16:17 +00:00
|
|
|
- name: checkout
|
2024-09-10 18:52:49 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-05-09 16:35:54 +00:00
|
|
|
- name: Install Rust aarch64
|
2024-09-10 18:52:49 +00:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2022-12-13 15:49:08 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: aarch64-apple-darwin
|
2022-12-14 18:10:08 +00:00
|
|
|
components: rustfmt, clippy
|
2024-05-09 16:35:54 +00:00
|
|
|
- name: Install Rust x86_64
|
2024-09-10 18:52:49 +00:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2024-05-09 16:35:54 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: x86_64-apple-darwin
|
|
|
|
components: rustfmt, clippy
|
2022-12-14 18:10:08 +00:00
|
|
|
- name: Set up cargo cache
|
2023-05-01 23:30:22 +00:00
|
|
|
uses: Swatinem/rust-cache@v2
|
2022-12-14 18:10:08 +00:00
|
|
|
continue-on-error: false
|
|
|
|
with:
|
2023-08-04 22:38:49 +00:00
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
|
2023-05-01 23:30:22 +00:00
|
|
|
shared-key: ${{ runner.os }}-cargo-
|
|
|
|
workspaces: |
|
2023-08-04 22:38:49 +00:00
|
|
|
rustybits/
|
2022-12-13 15:16:17 +00:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: selftest
|
2022-12-14 18:10:08 +00:00
|
|
|
run: |
|
|
|
|
make selftest
|
|
|
|
./zerotier-selftest
|
2024-09-10 18:52:49 +00:00
|
|
|
- name: Archive production artifacts
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: zerotier-one-mac
|
|
|
|
path: zerotier-one
|
|
|
|
retention-days: 7
|
|
|
|
|
2022-12-13 15:49:08 +00:00
|
|
|
|
2022-12-14 10:52:30 +00:00
|
|
|
build_windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: gitconfig
|
|
|
|
run: |
|
2023-03-07 21:50:34 +00:00
|
|
|
git config --global core.autocrlf true
|
|
|
|
# git config --global core.eol lf
|
2022-12-14 10:52:30 +00:00
|
|
|
- name: checkout
|
2024-09-10 18:52:49 +00:00
|
|
|
uses: actions/checkout@v4
|
2022-12-14 18:10:08 +00:00
|
|
|
- name: Install Rust
|
2024-09-10 18:52:49 +00:00
|
|
|
uses: dtolnay/rust-toolchain@stable
|
2022-12-14 18:10:08 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: aarch64-apple-darwin
|
|
|
|
components: rustfmt, clippy
|
|
|
|
- name: Set up cargo cache
|
2023-05-01 23:30:22 +00:00
|
|
|
uses: Swatinem/rust-cache@v2
|
2022-12-14 18:10:08 +00:00
|
|
|
continue-on-error: false
|
|
|
|
with:
|
2023-08-04 22:38:49 +00:00
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('rustybits//Cargo.lock') }}
|
2023-05-01 23:30:22 +00:00
|
|
|
shared-key: ${{ runner.os }}-cargo-
|
|
|
|
workspaces: |
|
2023-08-04 22:38:49 +00:00
|
|
|
rustybits/
|
2023-05-01 23:30:22 +00:00
|
|
|
|
2022-12-14 10:52:30 +00:00
|
|
|
- name: setup msbuild
|
2024-09-10 18:52:49 +00:00
|
|
|
uses: microsoft/setup-msbuild@v2
|
2022-12-14 10:52:30 +00:00
|
|
|
- name: msbuild
|
|
|
|
run: |
|
2024-09-10 18:52:49 +00:00
|
|
|
msbuild windows\ZeroTierOne.sln /m /p:Configuration=Release /property:Platform=x64 /t:ZeroTierOne
|
|
|
|
- name: Archive production artifacts
|
|
|
|
uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: zerotier-one-windows
|
|
|
|
path: windows/Build
|
|
|
|
retention-days: 7
|