Skip to content

Commit 3e779b2

Browse files
Do not manually update binaries
This adds a test that forbid binaries for being updated by a pull request. Binaries should be updated using the corresponding github action. This ensures that all 3 binaries are always at the same release, and also that they are built predictably. In particular, this should allow us to pinpoint a specific glibc version on linux.
1 parent 8858627 commit 3e779b2

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Do not manually update the binaries
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
check_no_binary:
10+
name: Do not include release binaries in a pull request
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 2
17+
- shell: bash
18+
id: check_binary_files_changed
19+
env:
20+
LINUX_BINARY: addons/dijkstra-map/Dijkstra_map_library/bin/linux/libdijkstra_map_gd.so
21+
WINDOWS_BINARY: addons/dijkstra-map/Dijkstra_map_library/bin/windows/dijkstra_map_gd.dll
22+
MACOS_BINARY: addons/dijkstra-map/Dijkstra_map_library/bin/macos/libdijkstra_map_gd.dylib
23+
run: |
24+
DIFF_LIST=$(git diff --name-only HEAD^ HEAD)
25+
if [[ $DIFF_LIST == *$LINUX_BINARY* ]] || [[ $DIFF_LIST == *$WINDOWS_BINARY* ]] || [[ $DIFF_LIST == *$MACOS_BINARY* ]] ; then
26+
FILE_CHANGED=True
27+
exit 1
28+
else
29+
FILE_CHANGED=False
30+
exit 0
31+
fi

0 commit comments

Comments
 (0)