embl-cba / imagej-utils

BSD 2-Clause "Simplified" License
2 stars 4 forks source link

GitHub action CI #55

Closed tischi closed 2 years ago

tischi commented 2 years ago

@K-Meech I guess this repo is not yet using the new github action CI, is it? Would you be able to configure this?

K-Meech commented 2 years ago

Yes - it's not using the new one yet. I'll try to set it up! Do you already have the relevant secrets on this repo? (they should be under Settings > Secrets in github) I can't check because it's your repo :)

tischi commented 2 years ago

Yes, what do I need to do there?

K-Meech commented 2 years ago

If they're there, then nothing. I'll add the rest of the stuff.

tischi commented 2 years ago
image
K-Meech commented 2 years ago

Ah ok - then you'll need to get the secrets added by someone with permissions! Perhaps @imagejan?

tischi commented 2 years ago

OK, @imagejan should I give you some rights for this repo?

imagejan commented 2 years ago

Sorry, I don't have the SciJava maven secrets myself. They need to be added to your organization or repository by @hinerm or @ctrueden. It's usually easier if you have your repository in a GitHub organization, because then the secrets have to be added only once, instead of separately for each repository in your personal space. How about moving this repository to mobie or some other org where it makes sense?

tischi commented 2 years ago

I moved it to the embl-cba organisation. @hinerm or @ctrueden, could you please add the secrets? @imagejan do I need to add them to the organisation?

ctrueden commented 2 years ago

@tischi If you add me as an owner to the org, I'll be able to add the secrets, then remove myself from the org again. Then every repository in the org will be able to use ci-build.sh including deploys to maven.scijava.org.

ctrueden commented 2 years ago

@tischi Secrets added!

tischi commented 2 years ago

Thanks @ctrueden!! @K-Meech you do the rest? 😃

K-Meech commented 2 years ago

Ah I'd forgotten - I was having issues with running this on Windows via gitbash when I tried this for mobie: https://github.com/mobie/mobie-viewer-fiji/issues/303#issuecomment-915230325 @imagejan - any idea how to fix this problem? I see the same for this repo - [ERROR] Could not determine GitHub repository slug

Otherwise @tischi you can run the rest. You just need to run the github-actionify.sh from here: https://github.com/scijava/scijava-scripts/blob/main/github-actionify.sh on a local version of the repo, then push the changes it made. I guess also delete anything to do with the old travis workflow too.

tischi commented 2 years ago

@K-Meech

Done.

Does this look good to you?

K-Meech commented 2 years ago

Looks good @tischi!

K-Meech commented 2 years ago

Although - it didn't deploy: No deploy -- repository fork: https://github.com/embl-cba/imagej-utils != https://github.com/tischi/imagej-utils. So you probably need to update the stuff in your pom, to point to the new github repo location.

imagejan commented 2 years ago

@K-Meech wrote:

I see the same for this repo - [ERROR] Could not determine GitHub repository slug

Did you run the shell script from Git Bash? Or some other prompt?

What's the output of the following line for you, when run from the repository root folder (that contains pom.xml)?

echo $(xmllint --xpath '//*[local-name()="project"]/*[local-name()="scm"]/*[local-name()="connection"]' pom.xml | sed 's_.*github.com[:/]\(.*\)<.*_\1_')

For me, this prints tischi/imagej-utils (from Git Bash on Windows).

K-Meech commented 2 years ago

Yes - I ran it on Git Bash. Weirdly for me, this just prints out the Usage guidelines for xmllint, so maybe there's something wrong with my xmllint installation?:

        Parse the XML files and output the result of the parsing
        --version : display the version of the XML library used
        --debug : dump a debug tree of the in-memory document
        --shell : run a navigating shell
        --debugent : debug the entities defined in the document
        --copy : used to test the internal copy implementation
        --recover : output what was parsable on broken XML documents
        --huge : remove any internal arbitrary parser limits
        --noent : substitute entity references by their value
        --noenc : ignore any encoding specified inside the document
        --noout : don't output the result tree
        --path 'paths': provide a set of paths for resources
        --load-trace : print trace of all external entities loaded
        --nonet : refuse to fetch DTDs or entities over network
        --nocompact : do not generate compact text nodes
        --htmlout : output results as HTML
        --nowrap : do not put HTML doc wrapper
        --valid : validate the document in addition to std well-formed check
        --postvalid : do a posteriori validation, i.e after parsing
        --dtdvalid URL : do a posteriori validation against a given DTD
        --dtdvalidfpi FPI : same but name the DTD with a Public Identifier
        --timing : print some timings
        --output file or -o file: save to a given file
        --repeat : repeat 100 times, for timing or profiling
        --insert : ad-hoc test for valid insertions
        --compress : turn on gzip compression of output
        --html : use the HTML parser
        --xmlout : force to use the XML serializer when using --html
        --nodefdtd : do not default HTML doctype
        --push : use the push mode of the parser
        --pushsmall : use the push mode of the parser using tiny increments
        --memory : parse from memory
        --maxmem nbbytes : limits memory allocation to nbbytes bytes
        --nowarning : do not emit warnings from parser/validator
        --noblanks : drop (ignorable?) blanks spaces
        --nocdata : replace cdata section with text nodes
        --format : reformat/reindent the output
        --encode encoding : output in the given encoding
        --dropdtd : remove the DOCTYPE of the input docs
        --pretty STYLE : pretty-print in a particular style
                         0 Do not pretty print
                         1 Format the XML content, as --format
                         2 Add whitespace inside tags, preserving content
        --c14n : save in W3C canonical format v1.0 (with comments)
        --c14n11 : save in W3C canonical format v1.1 (with comments)
        --exc-c14n : save in W3C exclusive canonical format (with comments)
        --nsclean : remove redundant namespace declarations
        --testIO : test user I/O support
        --catalogs : use SGML catalogs from $SGML_CATALOG_FILES
                     otherwise XML Catalogs starting from
                 file:///etc/xml/catalog are activated by default
        --nocatalogs: deactivate all catalogs
        --auto : generate a small doc on the fly
        --xinclude : do XInclude processing
        --noxincludenode : same but do not generate XInclude nodes
        --nofixup-base-uris : do not fixup xml:base uris
        --loaddtd : fetch external DTD
        --dtdattr : loaddtd + populate the tree with inherited attributes
        --stream : use the streaming interface to process very large files
        --walker : create a reader and walk though the resulting doc
        --pattern pattern_value : test the pattern support
        --chkregister : verify the node registration code
        --relaxng schema : do RelaxNG validation against the schema
        --schema schema : do validation against the WXS schema
        --schematron schema : do validation against a schematron
        --sax1: use the old SAX1 interfaces for processing
        --sax: do not build a tree but work just at the SAX level
        --oldxml10: use XML-1.0 parsing rules before the 5th edition
        --xpath expr: evaluate the XPath expression, imply --noout

Libxml project home page: http://xmlsoft.org/
To report bugs or get some help check: http://xmlsoft.org/bugs.html
imagejan commented 2 years ago

That's weird indeed. @K-Meech what does xmllint --version output for you?

For reference, here's my output (seems to be in my conda base environment):

C:\anaconda383\x64\Library\bin\xmllint.exe: using libxml version 20910
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv Unicode Regexps Automata Schemas Schematron Modules Debug Zlib
tischi commented 2 years ago

@K-Meech Where do you see that the build did not work? On your local computer or on the repo's website? E.g. here: https://github.com/embl-cba/imagej-utils/actions?

tischi commented 2 years ago

@imagejan according to https://github.com/embl-cba/imagej-utils/actions it seems to work, but I cannot find the current version on https://maven.scijava.org/#nexus-search;quick~imagej-utils Any ideas?

imagejan commented 2 years ago

@tischi the build worked, but the build script "decided" to skip the deploy step, because your repo slug doesn't match the GitHub repository (tischi != embl-cba), see https://github.com/embl-cba/imagej-utils/runs/4115306879?check_suite_focus=true#step:6:18

Fix it here: https://github.com/embl-cba/imagej-utils/blob/e2dce62f6f81dec9327b3cf3bece1f006c150c99/pom.xml#L67-L75

K-Meech commented 2 years ago

That's weird indeed. @K-Meech what does xmllint --version output for you?

Hmmm... this prints out the same for me (just the usage guidelines again). Strange.

tischi commented 2 years ago

@imagejan I think I fixed the pom, but now the build failed with some strange error message:

 Error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project imagej-utils: Failed to deploy artifacts: Could not transfer artifact de.embl.cba:imagej-utils:jar:0.5.5 from/to scijava.releases (dav:https://maven.scijava.org/content/repositories/releases): Failed to transfer file: https://maven.scijava.org/content/repositories/releases/de/embl/cba/imagej-utils/0.5.5/imagej-utils-0.5.5.jar. Return code is: 400 -> [Help 1]

I have no idea where this version 0.5.5 stuff comes from, as the version in the pom is 0.6.4. 🤔

tischi commented 2 years ago

There was a release.properties file in the repo containing the version 0.5.5 I deleted this file and am trying again...

tischi commented 2 years ago

That was it. Works now! Thanks a lot @imagejan and @ctrueden and @K-Meech !