Skip to content
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

[CI] Add GitHub Actions #451

Merged
merged 6 commits into from
Aug 26, 2021
Merged

[CI] Add GitHub Actions #451

merged 6 commits into from
Aug 26, 2021

Conversation

Frenzie
Copy link
Member

@Frenzie Frenzie commented Aug 26, 2021

References #443 (comment).


This change is Reviewable

@Frenzie
Copy link
Member Author

Frenzie commented Aug 26, 2021

At first I figured Travis would be easier (i.e., same config, or so I assumed), but I spent some 10 times as much trying to get that to work and it's refusing to see the repo. GitHub Actions took a couple of minutes.

Edit: just a few minor things remaining in the script.

Naïve workaround, see actions/runner#342
@Frenzie
Copy link
Member Author

Frenzie commented Aug 26, 2021

@poire-z Didn't you say something about that JSON stuff no longer being relevant?

@poire-z
Copy link
Contributor

poire-z commented Aug 26, 2021

I remember I did (but not really what :)
#383 (comment)

So, it's not used, but it kinda can be some reference (although duplicated with textlang.cpp, but I think we kept them in-sync).
You don't see any reason for the failure ? and/or how to fix it ?

Dunno why, I don't see the github action link/log that I quickly saw earlier this afternoon...
edit: well, logged out, saw the red cross and the link - then logged in again, saw the red cross and the link, working in both cases.

@Frenzie
Copy link
Member Author

Frenzie commented Aug 26, 2021

You don't see any reason for the failure ? and/or how to fix it ?

It doesn't happen locally for me, so I don't want to spend time on something that I seem to recall you saying wasn't necessary anymore.

@poire-z
Copy link
Contributor

poire-z commented Aug 26, 2021

Well, it's a good opportunity to understand the platform pecularities - before we move the more complex frontend :)
From what I see, the languages causing issues are the ones that have a buddy (ie. Latin.pattern + Latin_liturgical.pattern, Portuguese.pattern + Portuguese_BR.pattern).
So, some different sorting behaviour between the file search vs. the json extraction ?

@@ -26,7 +30,7 @@ for pattern in "${pattern_files[@]}"; do
xmllint "$pattern" >/dev/null || SHELLSCRIPT_ERROR=1
done

changed_files="$(git diff --name-only "$TRAVIS_COMMIT_RANGE" | grep -E '\.([CcHh]|[ch]pp)$')"
changed_files="$(git diff --name-only origin/master HEAD | grep -E '\.([CcHh]|[ch]pp)$')"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would need some more work to replicate $TRAVIS_COMMIT_RANGE, but it's probably just fine.

@Frenzie Frenzie merged commit a8c57ac into koreader:master Aug 26, 2021
@Frenzie Frenzie deleted the github-actions branch August 26, 2021 18:51
@poire-z
Copy link
Contributor

poire-z commented Aug 26, 2021

How do I solve this ? :/

$ git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.

$ git fetch upstream ; git merge upstream/master
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 7 (delta 2), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
From https://github.com/koreader/crengine
   b20e7717e..a8c57ac15  master     -> upstream/master
Updating b20e7717e..a8c57ac15
Fast-forward
 .ci/script.sh               |  8 ++++++--
 .github/workflows/build.yml | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 2 deletions(-)
 create mode 100644 .github/workflows/build.yml

$ git push origin master
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/poire-z/crengine.git
 ! [remote rejected]     master -> master (refusing to allow a Personal Access Token to create or update workflow `.github/workflows/build.yml` without `workflow` scope)
error: failed to push some refs to 'https://github.com/poire-z/crengine.git'

@poire-z
Copy link
Contributor

poire-z commented Aug 26, 2021

^Just needed to also check [x] Workflow to that personal token I was forced to made some months ago ;)

@Frenzie
Copy link
Member Author

Frenzie commented Aug 26, 2021

git push -f etc.

@Frenzie
Copy link
Member Author

Frenzie commented Aug 26, 2021

Sorry, small mobile screen. My bad. No idea.

@poire-z
Copy link
Contributor

poire-z commented Aug 26, 2021

It's solved :)

Just needed to also check [x] Workflow to that personal token I was forced to made some months ago ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants