-
Notifications
You must be signed in to change notification settings - Fork 19
128 lines (108 loc) · 3.65 KB
/
build.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Build sample material
on:
schedule:
- cron: '0 0 * * Mon' # Run this job weekly, on Monday midnights
push:
pull_request:
jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Install tools
uses: taiki-e/install-action@v2
with:
- name: Install targets
run: |
rustup target add thumbv7em-none-eabihf
rustup component add rust-src
rustup component add rustfmt
- name: Find slug name
run: |
slug=$(./describe.sh "${GITHUB_REF}")
echo "Building with slug '${slug}'"
echo "slug=${slug}" >> "${GITHUB_ENV}"
- name: Build and test
env: # Or as an environment variable
HIDDEN_MESSAGE: ${{ secrets.HIDDEN_MESSAGE }}
run: |
./build.sh "./rust-exercises-${{ env.slug }}"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: ${{success()}}
with:
name: Artifacts
if-no-files-found: error
path: |
./rust-exercises-*
- name: Create and Upload Release
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/')
id: create_release
uses: ncipollo/release-action@v1
with:
artifacts: "./rust-exercises-${{ env.slug }}.zip,./rust-exercises-${{ env.slug }}/nrf52-code/boards/dongle-fw/*-fw"
allowUpdates: true
updateOnlyUnreleased: true
build-weekly-beta:
runs-on: ubuntu-20.04
if: needs.pr-check.outputs.number != null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Install tools
uses: taiki-e/install-action@v2
with:
- name: Install targets
run: |
rustup target add thumbv7em-none-eabihf
rustup component add rust-src
rustup component add rustfmt
- name: Update Beta
run: |
rustup update beta
rustup default beta
- name: Find slug name
run: |
slug=$(./describe.sh "${GITHUB_REF}")
echo "Building with slug '${slug}'"
echo "slug=${slug}" >> "${GITHUB_ENV}"
- name: Build and test
env: # Or as an environment variable
HIDDEN_MESSAGE: ${{ secrets.HIDDEN_MESSAGE }}
run: |
./build.sh "./rust-exercises-${{ env.slug }}"
build-weekly-nightly:
runs-on: ubuntu-20.04
if: needs.pr-check.outputs.number != null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Install tools
uses: taiki-e/install-action@v2
with:
- name: Install targets
run: |
rustup target add thumbv7em-none-eabihf
rustup component add rust-src
rustup component add rustfmt
- name: Update Nightly
run: |
rustup update nightly
rustup default nightly
- name: Find slug name
run: |
slug=$(./describe.sh "${GITHUB_REF}")
echo "Building with slug '${slug}'"
echo "slug=${slug}" >> "${GITHUB_ENV}"
- name: Build and test
env: # Or as an environment variable
HIDDEN_MESSAGE: ${{ secrets.HIDDEN_MESSAGE }}
run: |
./build.sh "./rust-exercises-${{ env.slug }}"