Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2196ef7
Attempt Tag and Release workflow for old C gem
gjtorikian Nov 10, 2022
d8a43bc
Allow for manual dispatch
gjtorikian Nov 14, 2022
9a24e6d
Test fake version
gjtorikian Nov 14, 2022
5b807a1
ease up
gjtorikian Nov 14, 2022
bbf631b
lint
gjtorikian Nov 14, 2022
1cfec13
Merge pull request #201 from gjtorikian/c-api-stable-test
gjtorikian Nov 14, 2022
9007c37
Update cmark-upstream to https://github.com/github/cmark-gfm/commit/5…
phillmv Jan 24, 2023
30419c2
Added call to cmark_init_standard_node_flags()
phillmv Jan 24, 2023
9c923b0
:gem: release 0.23.7
phillmv Jan 24, 2023
2e724ec
Turned off Rubocop.
phillmv Jan 24, 2023
734fd86
Merge pull request #224 from gjtorikian/update-to-29.0.gfm.7
phillmv Jan 24, 2023
8bd769c
Update cmark-upstream to https://github.com/github/cmark-gfm/commit/c…
phillmv Jan 31, 2023
85c2057
Added aria-label changes to test-footnotes.rb
phillmv Jan 31, 2023
5249f70
:gem: release 0.23.8
phillmv Jan 31, 2023
94c0af9
Merge pull request #227 from gjtorikian/update-to-0.29.0.gfm.9
phillmv Jan 31, 2023
d6fe4c8
Update cmark-upstream to https://github.com/github/cmark-gfm/commit/d…
phillmv Mar 31, 2023
f303e6b
:gem: release 0.23.9
phillmv Mar 31, 2023
bbb49db
HtmlRenderer: don't nest <strong>
kivikakk Apr 1, 2023
2eb8ca8
Update cmark-upstream to https://github.com/github/cmark-gfm/commit/c…
Apr 6, 2023
4e4588f
Update Makefile for export header consolidation
Apr 6, 2023
d793fbf
Update cmark-upstream to https://github.com/github/cmark-gfm/commit/1…
Apr 6, 2023
42cfc90
Merge pull request #236 from anticomputer/update-to-0.29.0.gfm.10
phillmv Apr 11, 2023
ebbedc0
Rename CommonMarker to QiitaMarker
wataru86 Apr 25, 2023
853b77a
Merge branch 'upstream-v0.23.9' into merge-upstream-v0.23.9
wataru86 May 1, 2023
b9c9313
Drop Ruby 2.7 support
wataru86 May 2, 2023
844f970
Update CHANGELOG.md
wataru86 May 2, 2023
51d7112
Rename CommonMarker to QiitaMarker
wataru86 May 9, 2023
3579fc8
Fix lint workflow to enable rubocop
wataru86 May 9, 2023
0100d71
Fix ruby-version of Linting GitHub Actions
wataru86 May 9, 2023
63a84b2
Fix code format by rubocop
wataru86 May 15, 2023
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
6 changes: 1 addition & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Linting

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main

jobs:
test:
Expand All @@ -14,7 +10,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
ruby-version: '3.0'
bundler-cache: true # 'bundle install' and cache
- name: Rubocop
run: bundle exec rake rubocop
86 changes: 86 additions & 0 deletions .github/workflows/tag_and_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Tag and Release

on:
workflow_dispatch:
push:
branches:
- c-api-stable
paths:
- "lib/qiita_marker/version.rb"

jobs:
c_gem:
name: Compile C gem
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true

- name: Compile gem
run: bundle exec rake compile

- name: Build gem
run: bundle exec rake build

- name: Display structure of built gems
run: ls -R
working-directory: pkg/

- name: Publish to RubyGems
working-directory: pkg/
env:
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_API_BOT_KEY}}
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
for i in *.gem; do
if [ -f "$i" ]
then
gem push "$i" || true
fi
done

release:
needs: ["c_gem"]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Ruby 3.1
uses: ruby/setup-ruby@v1
with:
rubygems: latest
ruby-version: 3.1
bundler-cache: true

- name: Configure Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "Actions Auto Build"

- name: Get current version
id: version-label
run: |
VERSION=$(grep VERSION lib/qiita_marker/version.rb | head -n 1 | cut -d'"' -f2)
echo "version=${VERSION}" >> $GITHUB_OUTPUT

- name: Create tag
run: |
git tag -a v${{ steps.version-label.outputs.version }} -m "Release v${{ steps.version-label.outputs.version }}"
git push origin --tags

- name: Publish release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ steps.version-label.outputs.version }} --generate-notes
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: CI

on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- production

jobs:
test:
Expand All @@ -16,7 +12,7 @@ jobs:
- ubuntu-latest
- macos-latest
- windows-latest
ruby-version: [3.1, 3.0.0, 2.7.2]
ruby-version: [3.1, 3.0.6]

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inherit_gem:
- config/minitest.yml

AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0
Exclude:
- "ext/**/*"
- "vendor/**/*"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

### Changed

- Update base CommonMarker version to `v0.23.9`.
- Drop Ruby 2.7 support

## 0.23.6.2 - 2022-11-18

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.2
FROM ruby:3.0.6

ENV RE2C_VERSION 1.3

Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,3 @@ ext/qiita_marker/cmark-gfm_export.h: ext/qiita_marker/cmark-upstream/build/src/c

ext/qiita_marker/cmark-gfm_version.h: ext/qiita_marker/cmark-upstream/build/src/cmark-gfm_version.h
cp $< $@

ext/qiita_marker/cmark-gfm-extensions_export.h: ext/qiita_marker/cmark-upstream/build/extensions/cmark-gfm-extensions_export.h
cp $< $@
17 changes: 9 additions & 8 deletions ext/qiita_marker/arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,16 @@ static void *arena_calloc(size_t nmem, size_t size) {
const size_t align = sizeof(size_t) - 1;
sz = (sz + align) & ~align;

struct arena_chunk *chunk;
if (sz > A->sz) {
A->prev = alloc_arena_chunk(sz, A->prev);
return (uint8_t *) A->prev->ptr + sizeof(size_t);
A->prev = chunk = alloc_arena_chunk(sz, A->prev);
} else if (sz > A->sz - A->used) {
A = chunk = alloc_arena_chunk(A->sz + A->sz / 2, A);
} else {
chunk = A;
}
if (sz > A->sz - A->used) {
A = alloc_arena_chunk(A->sz + A->sz / 2, A);
}
void *ptr = (uint8_t *) A->ptr + A->used;
A->used += sz;
void *ptr = (uint8_t *) chunk->ptr + chunk->used;
chunk->used += sz;
*((size_t *) ptr) = sz - sizeof(size_t);
return (uint8_t *) ptr + sizeof(size_t);
}
Expand All @@ -98,6 +99,6 @@ static void arena_free(void *ptr) {

cmark_mem CMARK_ARENA_MEM_ALLOCATOR = {arena_calloc, arena_realloc, arena_free};

cmark_mem *cmark_get_arena_mem_allocator() {
cmark_mem *cmark_get_arena_mem_allocator(void) {
return &CMARK_ARENA_MEM_ALLOCATOR;
}
Loading