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