-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (76 loc) · 2.24 KB
/
nightly.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: soar nightly
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
remove-nightly-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Remove existing nightly tag
run: |
gh release delete nightly --cleanup-tag || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-nightly:
name: Publish nightly binaries
runs-on: ${{ matrix.build.os }}
strategy:
fail-fast: false
matrix:
build:
- {
NAME: x86_64-linux,
OS: ubuntu-22.04,
TOOLCHAIN: stable,
TARGET: x86_64-unknown-linux-musl,
}
- {
NAME: aarch64-linux,
OS: ubuntu-22.04,
TOOLCHAIN: stable,
TARGET: aarch64-unknown-linux-musl,
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
--allow-unauthenticated musl-tools b3sum
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.build.TOOLCHAIN }}
target: ${{ matrix.build.TARGET }}
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --locked --target ${{ matrix.build.TARGET }}
- name: Prepare nightly binary
shell: bash
run: |
mkdir -p nightly
cp "target/${{ matrix.build.TARGET }}/release/soar" nightly/soar-nightly-${{ matrix.build.NAME }}
b3sum nightly/soar-nightly-${{ matrix.build.NAME }} > nightly/soar-nightly-${{ matrix.build.NAME }}.b3sum
- name: Upload nightly binary
uses: softprops/action-gh-release@v2
with:
files: nightly/*
tag_name: nightly
name: "Nightly Build"
body: "This is an automated nightly build of Soar."
prerelease: true
draft: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}