-
-
Notifications
You must be signed in to change notification settings - Fork 34
102 lines (95 loc) · 3.42 KB
/
nightly.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Release nightly / canary
on:
# Canary from develop branches
push:
branches:
- develop-*
# Nightly every day at midnight
schedule:
- cron: "0 0 * * *"
# Uncomment to test in PRs (its safe)
# pull_request:
permissions:
contents: write
id-token: write
jobs:
build:
if: (github.event_name == 'schedule' && github.repository == 'moonrepo/proto') || (github.event_name != 'schedule')
strategy:
fail-fast: false
matrix:
include:
- target: aarch64-unknown-linux-gnu
host: buildjet-8vcpu-ubuntu-2204-arm
ext: ""
- target: x86_64-unknown-linux-gnu
host: ubuntu-20.04
ext: ""
- target: x86_64-apple-darwin
host: macos-12
ext: ""
setup: |
export MACOSX_DEPLOYMENT_TARGET="10.13";
- target: aarch64-apple-darwin
host: macos-12
ext: ""
setup: |
export CC=$(xcrun -f clang);
export CXX=$(xcrun -f clang++);
export SDKROOT=$(xcrun -sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SDKROOT -isystem $SDKROOT";
export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version);
- target: x86_64-pc-windows-msvc
host: windows-2022
ext: .exe
name: Stable - ${{ matrix.target }}
runs-on: ${{ matrix.host }}
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-release
cache-base: master
- name: Setup toolchain
if: ${{ matrix.setup }}
run: ${{ matrix.setup }}
- name: Bump versions
run: cargo release version minor --execute --workspace --no-confirm --verbose
- name: Build binary
run: |
rustup target add ${{ matrix.target }}
cargo build --release --target ${{ matrix.target }}
env:
RUST_BACKTRACE: 1
- name: Rename binary
run: |
mv ./target/${{ matrix.target }}/release/proto${{ matrix.ext }} ./proto-${{ matrix.target }}${{ matrix.ext }}
mv ./target/${{ matrix.target }}/release/proto-shim${{ matrix.ext }} ./proto-shim-${{ matrix.target }}${{ matrix.ext }}
# Canary
- if: ${{ github.event_name == 'push' && contains(github.ref, 'develop-') }}
uses: ncipollo/release-action@v1
name: Create GitHub release
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: proto-${{ matrix.target }}${{ matrix.ext }},proto-shim-${{ matrix.target }}${{ matrix.ext }}
body: "This canary release corresponds to the commit [${{ github.sha }}]."
name: "Canary"
tag: "canary"
prerelease: true
replacesArtifacts: true
skipIfReleaseExists: false
# Nightly
- if: ${{ github.event_name == 'schedule' }}
uses: ncipollo/release-action@v1
name: Create GitHub release
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: proto-${{ matrix.target }}${{ matrix.ext }},proto-shim-${{ matrix.target }}${{ matrix.ext }}
body: "This nightly release corresponds to the commit [${{ github.sha }}]."
name: "Nightly"
tag: "nightly"
prerelease: true
replacesArtifacts: true
skipIfReleaseExists: false