-
-
Notifications
You must be signed in to change notification settings - Fork 76
149 lines (139 loc) · 5.66 KB
/
Copy pathmain.yml
File metadata and controls
149 lines (139 loc) · 5.66 KB
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: Generate CI pipelines for ROS packages
permissions:
actions: write
contents: write
env:
ROS_VERSION: 1
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: prefix-dev/setup-pixi@v0.9.4
with:
frozen: true
- name: Generate recipes for linux-64
run: |
git clean -fdx
pixi run -v vinca --multiple --platform linux-64
- name: Generate GitHub Actions pipelines for linux-64
run: |
pixi run -v vinca-gha --platform linux-64 --trigger-branch buildbranch_linux -d ./recipes
- name: Commit files for linux-64
run: |
if [[ -f "linux.yml" ]]; then
mv linux.yml .github/workflows/
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f . ':!.pixi'
git commit -m "Add build files `date '+%Y-%m-%d-%H%M'`" -a
remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "${remote_repo}" HEAD:buildbranch_linux --follow-tags --force
fi
env:
INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }}
# Generate recipes for osx
- name: Reset repo
run: |
git reset --hard origin/main
- name: Generate recipes for osx-64
run: |
git clean -fdx
pixi run -v vinca --multiple --platform osx-64
- name: Generate GitHub Actions pipelines for osx-64
run: |
pixi run -v vinca-gha --platform osx-64 --trigger-branch buildbranch_osx -d ./recipes
- name: Commit files for osx-64
run: |
if [[ -f "osx.yml" ]]; then
mv osx.yml .github/workflows/
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f . ':!.pixi'
git commit -m "Add build files `date '+%Y-%m-%d-%H%M'`" -a
remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "${remote_repo}" HEAD:buildbranch_osx --follow-tags --force
fi
env:
INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }}
# Generate recipes for osx-arm64
- name: Reset repo
run: |
git reset --hard origin/main
- name: Generate recipes for osx-arm64
run: |
git clean -fdx
pixi run -v vinca --multiple --platform osx-arm64
- name: Generate GitHub Actions pipelines for osx-arm64
run: |
pixi run -v vinca-gha --platform osx-arm64 --trigger-branch buildbranch_osx_arm64 -d ./recipes
- name: Commit files for osx-arm64
run: |
if [[ -f "osx_arm64.yml" ]]; then
mv osx_arm64.yml .github/workflows/
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f . ':!.pixi'
git commit -m "Add build files `date '+%Y-%m-%d-%H%M'`" -a
remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "${remote_repo}" HEAD:buildbranch_osx_arm64 --follow-tags --force
fi
env:
INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }}
# Generate recipes for Windows
- name: Reset repo
run: |
git reset --hard origin/main
- name: Generate recipes for win-64
run: |
git clean -fdx
pixi run -v vinca --multiple --platform win-64
- name: Generate GitHub Actions pipelines for win-64
run: |
# --batch_size 10 is a workaround for https://github.com/RoboStack/robostack.github.io/issues/105
pixi run -v vinca-gha --platform win-64 --trigger-branch buildbranch_win -d ./recipes --batch_size 10
- name: Commit files for win-64
run: |
if [[ -f "win.yml" ]]; then
mv win.yml .github/workflows/
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f . ':!.pixi'
git commit -m "Add build files `date '+%Y-%m-%d-%H%M'`" -a
remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "${remote_repo}" HEAD:buildbranch_win --follow-tags --force
fi
env:
INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }}
# Generate recipes for Linux ARM64
- name: Reset repo
run: |
git reset --hard origin/main
- name: Generate recipes for linux-aarch64
run: |
git clean -fdx
pixi run -v vinca --multiple --platform linux-aarch64
- name: Generate GitHub Actions pipelines for linux-aarch64
run: |
pixi run -v vinca-gha --platform linux-aarch64 --trigger-branch buildbranch_linux_aarch64 -d ./recipes
- name: Commit files for linux-aarch64
run: |
if [[ -f "linux_aarch64.yml" ]]; then
mv linux_aarch64.yml .github/workflows/build_linux_aarch64.yml
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -f . ':!.pixi'
git commit -m "Add build files `date '+%Y-%m-%d-%H%M'`" -a
remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push "${remote_repo}" HEAD:buildbranch_linux_aarch64 --follow-tags --force
fi
env:
INPUT_GITHUB_TOKEN: ${{ secrets.GHA_PAT }}
on:
push:
branches:
- master
- main