Skip to content

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

Merged
merged 1 commit into from
Feb 20, 2023
Merged

Generalize basic CI script #127

merged 1 commit into from
Feb 20, 2023

Conversation

danolivo
Copy link
Collaborator

No description provided.

@danolivo danolivo added this to the AQO 1.6 milestone Feb 19, 2023
@danolivo danolivo requested a review from Alena0704 February 19, 2023 13:22
@danolivo danolivo self-assigned this Feb 19, 2023
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)
Copy link
Collaborator

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 сразу будет определено и ниже дополнительная проверка не нужна


- name: "Prepare PG directory"
run: |
git clone https://github.com/postgres/postgres.git $GITHUB_WORKSPACE/../pg
Copy link
Collaborator

@Alena0704 Alena0704 Feb 20, 2023

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
Copy link
Collaborator

@Alena0704 Alena0704 Feb 20, 2023

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

@danolivo danolivo force-pushed the ci-generalization branch 2 times, most recently from c80dfe3 to de61cab Compare February 20, 2023 01:50
reviewed-by: a.rybakina
@danolivo danolivo merged commit f7a71af into stable13 Feb 20, 2023
@danolivo danolivo deleted the ci-generalization branch February 20, 2023 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants