-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Component Governance fix: Update libyaml (#4583)
Component governance fix: update libyaml
- Loading branch information
Showing
21 changed files
with
303 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: dist | ||
|
||
on: | ||
push: | ||
branches: [ release/* ] | ||
|
||
jobs: | ||
dist: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: env | sort | ||
|
||
- name: Get image | ||
run: | | ||
time docker pull yamlio/libyaml-dev | ||
docker images | grep libyaml | ||
- run: | | ||
make -C pkg/docker libyaml-dist-ci | ||
ls -l pkg/docker/output | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: release | ||
path: pkg/docker/output/yaml-0* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# How to Make a `libyaml` 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 | ||
|
||
### GitHub Actions Automation | ||
|
||
The github workflow: | ||
|
||
.github/workflows/dist.yaml | ||
|
||
will do this automatically for you. | ||
|
||
#### .github/workflows/dist.yaml | ||
|
||
This workflow will create release archives (`tar.gz` and `zip`). | ||
|
||
### Manually | ||
|
||
Make sure you have a clean git repository (no changed files). | ||
The following process will clone your current git directory. | ||
|
||
This will need the docker image `yamlio/libyaml-dev`. | ||
You can either pull it, or create it yourself: | ||
|
||
make docker-build | ||
|
||
### Create dist archives | ||
|
||
Run: | ||
|
||
make docker-dist | ||
|
||
It will run `make dist` in the container to create a tarball written to | ||
`pkg/docker/output`. | ||
It will also create a zipfile. | ||
|
||
## 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 | ||
|
||
## Create a GitHub release | ||
|
||
Go to "Releases" and click on "Draft a new release". | ||
|
||
Fill in the tag you just created in the previous step. | ||
|
||
Fill in the release title: v0.x.y | ||
|
||
Paste the changelog into the description field. | ||
|
||
Upload the tar.gz and .zip file. | ||
|
||
You can "Save draft" and publish later, or directly click on "Publish release". | ||
|
||
## Update pyyaml.org | ||
|
||
See <https://github.com/yaml/pyyaml.org/blob/master/ReadMe.md>. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
output/* | ||
!Makefile | ||
!output/ReadMe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM ubuntu:18.04 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
automake \ | ||
bison \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
doxygen \ | ||
flex \ | ||
git \ | ||
less \ | ||
libtool \ | ||
python \ | ||
vim \ | ||
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 \ | ||
&& true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
DOCKER_IMAGE ?= yamlio/libyaml-dev | ||
|
||
build: | ||
docker build -t $(DOCKER_IMAGE) . | ||
|
||
run: build | ||
docker run -it --rm $(DOCKER_IMAGE) 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" \ | ||
$(DOCKER_IMAGE) /scripts/libyaml-dist.sh | ||
|
||
clean: | ||
rm -rf output/libyaml.git | ||
rm -rf output/yaml-*.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Output directory for build files created by docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env 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" |
Oops, something went wrong.