gap-packages / io

GAP package IO to do input and output
https://gap-packages.github.io/io/
Other
14 stars 14 forks source link

Add GitHub action for CI tests #88

Closed ssiccha closed 3 years ago

ssiccha commented 3 years ago

This PR configures GitHub Actions to run the package tests. It was created by a script. You can view the results of the added GitHub action at: https://github.com/ssiccha/io/actions This PR contains four commits which do:

Since this PR is generated automatically, please double-check that the last three commits do not break anything. You may also have to specify values for the variables GAP_PKGS_TO_BUILD and GAP_PKGS_TO_CLONE in the .github/workflows/CI.yml file as described further below.

The added GitHub action CI contains a job test, which runs your package's tests using the same scripts as previously did Travis, namely those from https://github.com/gap-system/pkg-ci-scripts By default it tests your package with the following gap branches:

The action CI also contains a job manual, which compiles your package's documentation with latex and uploads the resulting pdf as an artifact, which means that it can be downloaded once all jobs of the action completed.

If you need to compile packages to load your package, set the input GAP_PKGS_TO_BUILD for the action gap-actions/setup-gap-for-packages@v1 to a space-separated list of packages as follows:

- uses: gap-actions/setup-gap-for-packages@v1
  with:
    GAPBRANCH: ${{ matrix.gap-branch }}
    GAP_PKGS_TO_BUILD: "<list-of-packages>"

If you need to clone the development version of packages set the input GAP_PKGS_TO_CLONE for the action gap-actions/setup-gap-for-packages@v1 to a space-separated list of packages as follows:

- uses: gap-actions/setup-gap-for-packages@v1
  with:
    GAPBRANCH: ${{ matrix.gap-branch }}
    GAP_PKGS_TO_CLONE: "<list-of-packages>"

Notice that you may also have to set inputs for the action gap-actions/setup-gap-for-packages@v1 in the job manual.

If you want to adjust which tests are run have a look at the documentation of the job matrix.You can add changes to this PR by adding my fork as a remote, checking it out and then committing and pushing as follows:

git remote add ssiccha https://github.com/ssiccha/io
git checkout ss/add-GitHub-actions-for-package-tests
# Add and commit your changes
...
git push

The custom gap actions which are used by the added action can be found at: https://github.com/gap-actions

ssiccha commented 3 years ago

I'm still trying to get the 32bit tests to pass.

ssiccha commented 3 years ago

@fingolfin The ABI=32 run is failing: https://github.com/ssiccha/io/runs/1412602919?check_suite_focus=true#step:3:1013

I've compared the run with a successful one from travis. The line that fails in the action looks like this on travis:

/bin/bash /home/travis/gap/libtool --mode=compile gcc -m32 -g -O2 -MQ gen/src/io.lo -MMD -MP -MF gen/src/io.d -Igen --coverage -m32 -o gen/src/io.lo -I/home/travis/gap/build -I/home/travis/gap/src -I/home/travis/gap -DHAVE_CONFIG_H -c src/io.c

https://travis-ci.com/github/gap-packages/io/jobs/392772295#L1167 and like this in the action run:

/bin/bash /home/runner/gap/libtool --mode=compile gcc -g -O2 -MQ gen/src/io.lo -MMD -MP -MF gen/src/io.d -Igen --coverage -m32 -o gen/src/io.lo -I/home/runner/gap/build -I/home/runner/gap/src -I/home/runner/gap -DHAVE_CONFIG_H -c src/io.c

https://github.com/ssiccha/io/runs/1412602919?check_suite_focus=true#step:3:1013 So it seems there is an -m32 missing directly after the compile gcc bit. Do you have any idea what the reason could be for this?

ssiccha commented 3 years ago

32 bit tests work now.

fingolfin commented 3 years ago

@ssiccha do you plan to finish this or should I take over? I also don't quite understand how this relates to PR #89 resp. vice versa...

olexandr-konovalov commented 3 years ago

What happened to this and similar PRs elsewhere? Is there a canonical setup others may use? It would be useful to have a canonical setup in the example package https://github.com/gap-packages/example/pulls ...

ssiccha commented 3 years ago

@alex-konovalov Re the other PRs: I didn't have the time to finish them. :/ Re the example package: I think that's a good idea. @fingolfin Would it make sense to extend PackageMaker so that PackageWizard also offers to create a GitHub action for CI testing?

ssiccha commented 3 years ago

Tests work. See https://github.com/ssiccha/io/actions

ssiccha commented 3 years ago

Updated the Codecov badge and squashed.

ssiccha commented 3 years ago

@fingolfin Could you have a look again?