2023-09-27 17:47:05 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
master
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
|
|
build_x64:
|
|
|
|
runs_on: docker
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2023-09-27 17:47:54 +00:00
|
|
|
uses: actions/checkout@v2
|
2023-09-27 17:47:05 +00:00
|
|
|
- name: Setup Go toolchain
|
|
|
|
uses: actions/setup-go@v4
|
2023-09-27 18:04:16 +00:00
|
|
|
with:
|
|
|
|
go-version: '1.20'
|
2023-09-27 17:47:05 +00:00
|
|
|
- name: Setup Rust toolchain
|
2023-09-27 18:00:18 +00:00
|
|
|
uses: https://github.com/actions-rs/toolchain@v1
|
2023-09-27 17:47:05 +00:00
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2023-09-27 18:08:17 +00:00
|
|
|
- name: Install additional dependencies
|
2023-09-28 13:39:08 +00:00
|
|
|
run: apt update && apt-get install -y libclang-dev clang sshpass rsync
|
2023-09-27 17:47:05 +00:00
|
|
|
- name: Compile release binary
|
2023-09-27 18:00:18 +00:00
|
|
|
uses: https://github.com/actions-rs/cargo@v1
|
2023-09-27 17:47:05 +00:00
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --release --bin tfclient
|
|
|
|
- name: Upload binary
|
2023-09-28 14:55:09 +00:00
|
|
|
run: sshpass -p "${{ secrets.TRIFID_DLCDN_PASSWORD }}" rsync --mkpath -e 'ssh -p ${{ secrets.TRIFID_DLCDN_PORT }} -o StrictHostKeyChecking=no' target/release/tfclient ${{ secrets.TRIFID_DLCDN_USER }}@${{ secrets.TRIFID_DLCDN_IP }}:${{ secrets.TRIFID_DLCDN_PATH }}/tfclient/amd64/$GITHUB_SHA/tfclient
|
|
|
|
build_arm64:
|
|
|
|
runs_on: docker-arm64
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Go toolchain
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '1.20'
|
|
|
|
- name: Setup Rust toolchain
|
|
|
|
uses: https://github.com/actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- name: Install additional dependencies
|
|
|
|
run: apt update && apt-get install -y libclang-dev clang sshpass rsync
|
|
|
|
- name: Compile release binary
|
|
|
|
uses: https://github.com/actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --release --bin tfclient
|
|
|
|
- name: Upload binary
|
2023-10-10 13:21:37 +00:00
|
|
|
run: sshpass -p "${{ secrets.TRIFID_DLCDN_PASSWORD }}" rsync --mkpath -e 'ssh -p ${{ secrets.TRIFID_DLCDN_PORT }} -o StrictHostKeyChecking=no' target/release/tfclient ${{ secrets.TRIFID_DLCDN_USER }}@${{ secrets.TRIFID_DLCDN_IP }}:${{ secrets.TRIFID_DLCDN_PATH }}/tfclient/arm64/$GITHUB_SHA/tfclient
|
|
|
|
build_win64:
|
|
|
|
runs_on: docker
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Go toolchain
|
|
|
|
uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: '1.20'
|
|
|
|
- name: Setup Rust toolchain
|
|
|
|
uses: https://github.com/actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- name: Install cross-compilation toolchain
|
|
|
|
run: rustup target add x86_64-pc-windows-gnu
|
|
|
|
- name: Install additional dependencies
|
|
|
|
run: apt update && apt-get install -y libclang-dev clang sshpass rsync
|
|
|
|
- name: Compile release binary
|
|
|
|
uses: https://github.com/actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --release --bin tfclient --target x86_64-pc-windows-gnu
|
|
|
|
- name: Compile release bundle
|
|
|
|
run: ./build_windows.sh
|
|
|
|
- name: Upload binary
|
|
|
|
run: sshpass -p "${{ secrets.TRIFID_DLCDN_PASSWORD }}" rsync --mkpath -e 'ssh -p ${{ secrets.TRIFID_DLCDN_PORT }} -o StrictHostKeyChecking=no' target/release/x86_64-pc-windows-gnu/tfclient.zip ${{ secrets.TRIFID_DLCDN_USER }}@${{ secrets.TRIFID_DLCDN_IP }}:${{ secrets.TRIFID_DLCDN_PATH }}/tfclient/win64/$GITHUB_SHA/tfclient.zip
|