Skip to content
Snippets Groups Projects
Commit c03f83fb7b5b authored by Tina Müller's avatar Tina Müller
Browse files

Add workflows for creating release tarballs and pyyaml testing

parent f7cc251cdad4
No related branches found
No related tags found
No related merge requests found
name: dist
on:
push:
branches: [ release/* ]
jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: env | sort
- name: Get image
run: |
time docker pull yamlio/libyaml-dev
docker images | grep libyaml
- run: |
make -C packaging/docker libyaml-dist-ci
- run: |
ls -l packaging/docker/output
- uses: actions/upload-artifact@v2
with:
name: release
path: packaging/docker/output/yaml-0*
name: pyyaml-test
on:
push:
branches: [ release/* ]
jobs:
pyyaml-test:
strategy:
matrix:
python:
- python2
- python3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: env | sort
- run: |
sudo apt-get install cython cython3
- run: |
make -C packaging/docker test-pyyaml-ci PYTHON=${{ matrix.python }}
......@@ -28,7 +28,6 @@
/configure
stamp-h1
!config/config.h.in
/packaging/
/tests/run-dumper
/tests/run-emitter
/tests/run-emitter-test-suite
......
......@@ -43,7 +43,6 @@
git clone --branch $(LIBYAML_TEST_SUITE_RUN_BRANCH) $(LIBYAML_TEST_SUITE_RUN_REPO) $@
endif
packaging:
-git branch --track $@ origin/$@
git worktree add --force $@ $@
docker-build:
make -C packaging/docker build
......@@ -49,4 +48,4 @@
docker-dist: packaging
make -C $</docker libyaml-dist
docker-dist:
make -C packaging/docker libyaml-dist
......@@ -52,3 +51,4 @@
docker-test-pyyaml: packaging
make -C $</docker test-pyyaml
docker-test-pyyaml:
make -C packaging/docker test-pyyaml PYTHON=python2
make -C packaging/docker test-pyyaml PYTHON=python3
# How to make a release
## Versioning
Update libyaml version in:
* announcement.msg
* Changes
* CMakeLists.txt
* `YAML_VERSION_MAJOR`, `YAML_VERSION_MINOR`, `YAML_VERSION_PATCH`
* .appveyor.yml
* configure.ac
* `YAML_MAJOR`, `YAML_MINOR`, `YAML_PATCH`, `YAML_RELEASE`, `YAML_CURRENT`, `YAML_REVISION`
Commit and push everything to release/0.x.y
## Test and Create Release archives
This will create a docker image (libyaml-dev), test libyaml & pyyaml,
and creat archives.
Make sure you have a clean git repository (no changed files). The following
process will clone your current git directory.
### Run pyyaml tests on release branch
Run
make docker-test-pyyaml
It will run all libyaml tests, and run pyyaml tests (with python 2 & 3) on
the current branch.
### Create dist archives
Run
make docker-dist
It will create a docker image (libyaml-dev) and run `make dist` in the container
to create a tarball written to packaging/docker/output.
It will also create a zipfile.
Unpack data for copying to dist branch:
cd packaging/docker/output
tar xvf yaml-0.x.y.tar.gz
## Update dist branch
git worktree add dist dist
cd dist
rm -r *
cp -r ../packaging/docker/output/yaml-0.x.y/* .
Check diffs and commit changes.
git tag dist-0.x.y
git push origin dist dist-0.x.y
## Update master
git merge release/0.x.y
git tag -a 0.x.y
# <Editor opens>
# Paste the corresponding entry from the Changes file
# Look at an earlier release for how it should look like:
# git show 0.2.3
git push origin master 0.x.y
## Update pyyaml.org
* Put the resulting tarball & zip in pyyaml.org/download/libyaml
* Update wiki/LibYAML.md with release number and date
* Update wiki/index.md
Run
make update
Check diffs and commit and push.
output/*
!Makefile
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y \
build-essential \
doxygen \
less \
cmake \
python \
cython \
python3 \
cython3 \
flex \
bison \
automake \
libtool \
curl \
vim \
git \
zip \
&& true
# http://www.doxygen.nl/manual/install.html
RUN curl https://sourceforge.net/projects/doxygen/files/rel-1.8.14/doxygen-1.8.14.src.tar.gz/download \
-L -o /doxygen-1.8.14.src.tar.gz && \
cd / && \
tar -xvf doxygen-1.8.14.src.tar.gz && \
cd doxygen-1.8.14 && \
mkdir build && \
cd build && \
cmake -G "Unix Makefiles" .. && \
make && \
make install
build:
docker build -t yamlio/libyaml-dev .
run: build
docker run -it --rm yamlio/libyaml-dev bash
prepare-git:
rm -rf output/libyaml.git
git clone ../../.git output/libyaml.git
libyaml-dist: libyaml-dist-ci
libyaml-dist-ci: prepare-git
docker run --rm -u $$(id -u) -v$$PWD/output:/output -v$$PWD/scripts:/scripts yamlio/libyaml-dev /scripts/libyaml-dist.sh
test-pyyaml: prepare-git
docker run --rm --env PYTHON -v$$PWD/output:/output -v$$PWD/scripts:/scripts yamlio/libyaml-dev /scripts/libyaml-test-pyyaml.sh
test-pyyaml-ci: prepare-git
OUTPUT=$$PWD/output ./scripts/libyaml-test-pyyaml.sh
clean:
rm -rf output/libyaml.git
rm -rf output/yaml-*.*
Output directory for build files createdd by docker
#!/bin/bash
set -ex
cp -r /output/libyaml.git /tmp/
cd /tmp/libyaml.git
./bootstrap
./configure
make dist
# get the tarball filename
tarballs=(yaml-*.tar.gz)
tarball=${tarballs[0]:?}
dirname=${tarball/.tar.gz/}
# Copy to output dir
cp "$tarball" /output
# Create zip archive
cd /tmp
cp "/output/$tarball" .
tar xvf "$tarball"
zip -r "/output/$dirname.zip" "$dirname"
#!/bin/bash
OUTPUT="${OUTPUT:-/output}"
set -ex
$PYTHON --version
cp -r $OUTPUT/libyaml.git /tmp/
cd /tmp/libyaml.git
./bootstrap
./configure
make test
sudo make install
sudo ldconfig
git clone https://github.com/yaml/pyyaml.git /tmp/pyyaml
cd /tmp/pyyaml
$PYTHON setup.py test
echo "$PYTHON pyyaml successful"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment