-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (90 loc) · 2.71 KB
/
test-cbindgen-workflow.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
name: Test CBindgen Workflow
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight
workflow_dispatch:
push:
branches: [ master ]
tags:
- 'v1'
paths:
- 'action.yml'
- '.github/workflows/test-cbindgen-workflow.yml'
pull_request:
branches: [ master ]
paths:
- 'action.yml'
- '.github/workflows/test-cbindgen-workflow.yml'
jobs:
test-custom-parameters:
runs-on: ubuntu-latest
steps:
- name: Checkout Test Repository
uses: actions/checkout@v4
with:
repository: Sewer56/prs-rs
ref: d08599ed5473616f57d57a0966939e1a5dbda9b4
- name: Test Custom Parameters
uses: Reloaded-Project/devops-rust-cbindgen@v1
with:
rust-project-path: '.'
config-file: cbindgen_cpp.toml
output-header-file: bindings_cpp.hpp
upload-artifact: false
- name: Assert Generated Header File
shell: bash
run: |
if [ ! -f bindings_cpp.hpp ]; then
echo "Generated header file does not exist"
exit 1
fi
test-c-bindings:
runs-on: ubuntu-latest
steps:
- name: Checkout Test Repository
uses: actions/checkout@v4
with:
repository: Sewer56/prs-rs
ref: d08599ed5473616f57d57a0966939e1a5dbda9b4
- name: Test C Bindings
uses: Reloaded-Project/devops-rust-cbindgen@v1
with:
config-file: cbindgen_c.toml
output-header-file: bindings_c.h
upload-artifact: false
- name: Assert Generated C Header File
shell: bash
run: |
if [ ! -f bindings_c.h ]; then
echo "Generated C header file does not exist"
exit 1
fi
test-artifact-creation:
runs-on: ubuntu-latest
steps:
- name: Checkout Test Repository
uses: actions/checkout@v4
with:
repository: Sewer56/prs-rs
ref: d08599ed5473616f57d57a0966939e1a5dbda9b4
- name: Generate Bindings and Create Artifact
uses: Reloaded-Project/devops-rust-cbindgen@v1
with:
config-file: cbindgen_c.toml
output-header-file: bindings_c.h
upload-artifact: true
github-token: ${{ secrets.GITHUB_TOKEN }}
commit-updated-bindings: 'false'
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: C-Bindings-bindings_c.h
path: artifacts
- name: Assert Artifact Contents
shell: bash
run: |
cat artifacts/bindings_c.h
if [ ! -f artifacts/bindings_c.h ]; then
echo "Extracted artifact does not contain the expected header file"
exit 1
fi