Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ on:
jobs:
build:
runs-on: ubuntu-24.04
container:
image: python:2.7.18
environment: ${{ (github.repository == 'jacoco/www.eclemma.org' && github.ref == 'refs/heads/master') && 'sites' || null }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: 'Build'
run: ./render.sh
run: |
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need a docker container here? Is it due to python 2? In this case I can try to upgrade the rendering script to python 3.

Copy link
Member Author

Choose a reason for hiding this comment

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

@marchof

Why do we need a docker container here? Is it due to python 2?

Yes: its use was added in #92 because Python 2 was available in ubuntu-20.04 GitHub Actions image, but not available in ubuntu-24.04 and it can not be installed with https://github.com/actions/setup-python since Python 2 reached EOL a long time ago - https://www.python.org/doc/sunset-python-2/

In this case I can try to upgrade the rendering script to python 3.

And yes - it will be awesome to update to Python 3!
FYI to do so according to my quick experiment we need to update generator/genshi to the version that supports Python 3 and a few other adjustments in generator.

Copy link
Member

Choose a reason for hiding this comment

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

Done: #98

Copy link
Member Author

Choose a reason for hiding this comment

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

@marchof Cool! Thanks!
I propose to anyway review+merge this one first since it is ready and small one and will unblock publishing of actual snapshots to web site - without it we are deploying old snapshot, while #98 is bigger and will take me some time to review.

Copy link
Member

Choose a reason for hiding this comment

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

No prob, I can rebase #98 afterwards.

docker run \
--user $(id -u):$(id -g) \
-v "/var/run/docker.sock":"/var/run/docker.sock" \
-v ${{ github.workspace }}:/work \
-w /work \
--entrypoint bash \
python:2.7.18 \
-c /work/render.sh
- name: 'Deploy'
if: ${{ (github.repository == 'jacoco/www.eclemma.org' && github.ref == 'refs/heads/master') }}
env:
Expand All @@ -26,8 +32,13 @@ jobs:
RESULT_DIR=$WORKING_DIR/result
TEMP=/tmp/jacoco-snapshot
mkdir $TEMP
wget -O $TEMP/download.zip "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=org.jacoco&a=jacoco&e=zip&v=LATEST"
unzip $TEMP/download.zip -d $TEMP
JACOCO_VERSION=0.8.14-SNAPSHOT
mvn -V -B -e --no-transfer-progress \
dependency:get \
-Dtransitive=false \
-DremoteRepositories=snapshot::default::https://central.sonatype.com/repository/maven-snapshots/ \
-Dartifact=org.jacoco:jacoco:$JACOCO_VERSION:zip
unzip $HOME/.m2/repository/org/jacoco/jacoco/$JACOCO_VERSION/jacoco-$JACOCO_VERSION.zip -d $TEMP

TARGET=$RESULT_DIR/jacoco/trunk
mkdir $TARGET
Expand Down
2 changes: 1 addition & 1 deletion content/jacoco/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2>Snapshot Builds</h2>

<ul>
<li><b><a href="http://www.jacoco.org/jacoco/trunk/doc/">Documentation</a></b></li>
<li><b><a href="https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&amp;g=org.jacoco&amp;a=jacoco&amp;e=zip&amp;v=LATEST">Download</a>
<li><b><a href="https://central.sonatype.com/service/rest/repository/browse/maven-snapshots/org/jacoco/jacoco/">Download</a>
(<a href="http://www.jacoco.org/jacoco/trunk/doc/repo.html">Maven Repository</a>)</b></li>
<li><b><a href="http://www.jacoco.org/jacoco/trunk/coverage/">Coverage Report</a></b></li>
</ul>
Expand Down