Skip to content

Commit

Permalink
Do not manually update binaries
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
arnaudgolfouse committed Oct 23, 2022
1 parent 8858627 commit 3e779b2
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/do_not_manually_update_binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Do not manually update the binaries

on:
pull_request:
branches:
- master

jobs:
check_no_binary:
name: Do not include release binaries in a pull request
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- shell: bash
id: check_binary_files_changed
env:
LINUX_BINARY: addons/dijkstra-map/Dijkstra_map_library/bin/linux/libdijkstra_map_gd.so
WINDOWS_BINARY: addons/dijkstra-map/Dijkstra_map_library/bin/windows/dijkstra_map_gd.dll
MACOS_BINARY: addons/dijkstra-map/Dijkstra_map_library/bin/macos/libdijkstra_map_gd.dylib
run: |
DIFF_LIST=$(git diff --name-only HEAD^ HEAD)
if [[ $DIFF_LIST == *$LINUX_BINARY* ]] || [[ $DIFF_LIST == *$WINDOWS_BINARY* ]] || [[ $DIFF_LIST == *$MACOS_BINARY* ]] ; then
FILE_CHANGED=True
exit 1
else
FILE_CHANGED=False
exit 0
fi

0 comments on commit 3e779b2

Please sign in to comment.