-
Notifications
You must be signed in to change notification settings - Fork 13
165 lines (163 loc) · 4.65 KB
/
ci.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: CI
on:
schedule:
# Runs at 2:00 AM every Sunday
- cron: "0 2 * * 0"
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.80.1
TINYGO_VERSION: v0.33.0
NODE_VERSION: 22
GO_VERSION: 1.23
jobs:
build-apps:
name: Build Spin Apps
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-wasi,wasm32-wasip1
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo git
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-
- name: Cache build artifacts
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install TinyGo
uses: rajatjindal/setup-actions/tinygo@v0.0.1
with:
version: ${{ env.TINYGO_VERSION }}
- name: Install Spin
# Latest Spin Stable Release
uses: fermyon/actions/spin/setup@v1
with:
plugins: js2wasm
- name: Install Command Trigger (canary) and it's dependencies
run: |
spin plugins install --yes --url https://github.com/fermyon/spin-trigger-command/releases/download/canary/trigger-command.json
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall --no-confirm cargo-component
- name: Build Aggregate App
run: |
cd aggregate-pattern
cd customers-service
npm install
cd ..
spin build
- name: Build CRUD (Go) SQLite App
run: |
cd http-crud-go-sqlite
spin build
- name: Build CRUD (JS) PostgreSQL App
run: |
cd http-crud-js-pg
npm install
spin build
- name: Build Azure Key Vault Provider App
run: |
cd application-variable-providers/azure-key-vault-provider
spin build
- name: Build HashiCorp Vault Provider App
run: |
cd application-variable-providers/vault-provider
spin build
- name: Build Caching App
run: |
cd caching-rust
spin build
- name: Build Content Negotiation App
run: |
cd content-negotiation-rust
spin build
- name: Build CORS App
run: |
cd cors-rust
spin build
- name: Build CQRS (Rust) App
run: |
cd cqrs-rust
spin build
- name: Build CQRS (Go) App
run: |
cd cqrs-go
spin build
- name: Build CRUD (JS) SQLite App
run: |
cd http-crud-js-sqlite
npm install
spin build
- name: Build CRUD (Rust) MySQL App
run: |
cd http-crud-rust-mysql
spin build
- name: Build Long Running Jobs over HTTP App
run: |
cd long-running-jobs-over-http
cd api
spin build
cd ..
cd spin-worker
spin build
- name: Build Publish-Subscribe App
run: |
cd pub-sub-polyglot
cd http-publisher-js
npm install
spin build
cd ..
cd mass-publisher
cargo build
cd ..
cd subscriber-go
spin build
cd ..
cd subscriber-rust
spin build
- name: Build Image Transformation (Rust) App
run: |
cd image-transformation
spin build
- name: Build distributed ToDo-app (Rust)
run: |
cd distributed-todo-app
cd src
cd http-api
spin build
cd ..
cd migrations
spin build
cd ..
cd stats-generator
spin build
cd ..