[CI] submodules #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: make | |
run: make | |
- name: Start server | |
run: ./simhash.server & | |
- name: Wait for server to start | |
run: | | |
timeout=10 | |
while ! curl "http://127.0.0.1:11201/?s=你好世界" do | |
if [ $timeout -le 0 ]; then | |
echo "Server failed to start" | |
exit 1 | |
fi | |
timeout=$(($timeout - 1)) | |
echo 'sleep 1' | |
sleep 1 | |
done |