-
Notifications
You must be signed in to change notification settings - Fork 54
Generalize basic CI script #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
echo "CORE_PATCH_NAME=$patch_name" >> $GITHUB_ENV | ||
|
||
# we can get number, otherwise set up master | ||
vers_number=$(echo "$patch_name"|tr -d -c 0-9) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
предлагается улучшение:
тут vers_number будет пустым, если название патча было, например: aqo_master.patch.
Можно без дополнительной проверки сразу добавить блок на else:
vers_number="$(echo "$patch_name"|tr -d -c 0-9)"'master'
тогда vers_number сразу будет определено и ниже дополнительная проверка не нужна
.github/workflows/c-cpp.yml
Outdated
|
||
- name: "Prepare PG directory" | ||
run: | | ||
git clone https://github.com/postgres/postgres.git $GITHUB_WORKSPACE/../pg |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
думаю можно ограничиться клонированием не всего репозитория, а определенной ветки, на которой будет тестироваться AQO (сэкономим память). То есть:
git clone -b $branch_name --depth $depth --single-branch https://github.com/postgres/postgres.git $GITHUB_WORKSPACE/../pg
cd $GITHUB_WORKSPACE/../pg | ||
git checkout $PG_BRANCH | ||
ls -la | ||
cp -r ../aqo contrib/aqo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не обязательно, но думаю, можно не копировать, а переместить файлы, так как у каждого раннера, скажем так свои файлы, и, если не перемещать,можно не копировать .git. Я использовала такую команду, если адаптировать ее под анный раннер:
mkdir contrib/aqo &&
mv $(find . -maxdepth 1 -mindepth 1 -not -name ".git") contrib/aqo
c80dfe3
to
de61cab
Compare
reviewed-by: a.rybakina
de61cab
to
43efdb5
Compare
No description provided.