-
Notifications
You must be signed in to change notification settings - Fork 0
149 lines (141 loc) · 4.87 KB
/
rust-ci.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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: CI
concurrency: ci-${{ github.ref }}
on:
push:
branches: [develop]
paths:
- "src/**/*.rs"
- Cargo.toml
- .rust-version
workflow_dispatch:
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux
os: ubuntu-latest
target: x86_64-unknown-linux-musl
# - build: macos
# os: macos-latest
# target: x86_64-apple-darwin
steps:
- uses: actions/checkout@v4
- name: Get language version
id: get_lang_version
run: |
v=$(cat .rust-version)
echo "lang_version=$v" >> $GITHUB_OUTPUT
- name: Install Rust
# Or @nightly if you want
uses: dtolnay/rust-toolchain@stable
# Arguments to pass in
with:
# Make Rust compile to our target (defined in the matrix)
targets: ${{ matrix.target }}
# rust-version: ${{ steps.get_lang_version.outputs.lang_version }}
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --verbose --release --target ${{ matrix.target }}
- name: publish-docs
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./coverage
# docs:
# needs: [tests]
# runs-on: ubuntu-latest
# concurrency: docs
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: "3.11"
# - name: install-deps
# run: pip install -r requirements/docs.txt
# - name: make-docs
# run: cd docs && make html
# - name: publish-docs
# uses: peaceiris/actions-gh-pages@v4
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs/_build/html
tag:
needs: [tests]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
publish:
needs: [tag]
runs-on: ubuntu-latest
concurrency: publish
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest tag
id: get_latest_tag
uses: actions-ecosystem/action-get-latest-tag@v1
# - name: Publish
# env:
# GOPROXY: proxy.golang.org
# run: go list -m github.com/sweetrpg/common@${{ steps.get_latest_tag.outputs.tag }}
notify:
needs: [tag]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- repo: api-core
- repo: catalog-api
- repo: catalog-data
- repo: catalog-data-processor
- repo: catalog-objects
- repo: catalog-web
- repo: client
- repo: data-api
- repo: data-objects
- repo: db
- repo: initiative-api
- repo: initiative-data
- repo: initiative-objects
- repo: initiative-web
- repo: kv-api
- repo: kv-data
- repo: kv-expression-processor
- repo: kv-key-processor
- repo: kv-objects
- repo: kv-value-calculator
- repo: kv-web
- repo: library-api
- repo: library-data
- repo: library-objects
- repo: library-web
- repo: main-web
- repo: model-core
- repo: shared-web
- repo: web-core
steps:
- uses: juztcode/repo-ditpatch-action@v1
continue-on-error: true
with:
event-type: db-published
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: sweetrpg/${{ matrix.repo }}