From 59ca23a00feca4a527bf6ad29baacafe9ef769ac Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Tue, 11 Jan 2022 10:36:05 +0800 Subject: [PATCH 1/9] Add sassc dependency to Gemfile --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 18d61939..53bb86fa 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ end gem "ffi" gem "rake" gem "seven_zip_ruby" +gem "sassc" group :development do gem "byebug" From 13bf75ab1081bed52e3a5e6286eb58679bca5d73 Mon Sep 17 00:00:00 2001 From: "Maxim [maxirmx] Samsonov" Date: Fri, 21 Jan 2022 02:14:02 +0300 Subject: [PATCH 2/9] sassc hack --- Makefile | 2 +- bin/metanorma | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e4b6262c..86d7564d 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ test-flavor: .archive/tebako/.git: mkdir -p .archive; - git clone https://github.com/tamatebako/tebako $(dir $@) + git clone -b "maxirmx_v0.3.2" https://github.com/tamatebako/tebako $(dir $@) .archive/tebako/bin/tebako: .archive/tebako/.git diff --git a/bin/metanorma b/bin/metanorma index d101da79..b6d6370b 100644 --- a/bin/metanorma +++ b/bin/metanorma @@ -178,6 +178,30 @@ if Gem.win_platform? require 'ffi-libarchive-binary' # to preload libarchive-13.dll end +# HACK unpack style files for sassc +require 'sassc' + +module SassC + class Engine + def load_paths() + paths = (@options[:load_paths] || []) + SassC.load_paths + np = [] + paths.each { |p| + if p.start_with?(COMPILER_MEMFS) + m = p.sub(COMPILER_MEMFS, COMPILER_MEMFS_LIB_CACHE.to_s) + FileUtils.cp_r(File.join(p, "."), m) if File.exists?(p) + np << m + else + np << p + end + } + np.join(File::PATH_SEPARATOR) unless np.empty? + end + end +end +# END of HACK + + Net::HTTP.class_eval do alias _use_ssl= use_ssl= From bf0c1b4367c09d050fd9050533a63c3e63d6353a Mon Sep 17 00:00:00 2001 From: "Maxim [maxirmx] Samsonov" Date: Fri, 21 Jan 2022 15:27:01 +0300 Subject: [PATCH 3/9] tebako v0.3.2 --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- Gemfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d4acd265..c04d8f40 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -27,7 +27,7 @@ env: TEBAKO_DIR: .archive/tebako DEPS: deps # Versions - TEBAKO_TAG: "v0.3.1" + TEBAKO_TAG: "v0.3.2" RUBY_VER: "2.7.5" RUBY_HASH: "2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1" BUNDLER_VER: "2.2.3" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 343d86f3..653a6cd4 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -26,7 +26,7 @@ env: TEBAKO_DIR: .archive/tebako DEPS: deps # Versions - TEBAKO_TAG: "v0.3.1" + TEBAKO_TAG: "v0.3.2" RUBY_VER: "2.7.5" RUBY_HASH: "2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1" BUNDLER_VER: "2.2.3" diff --git a/Gemfile b/Gemfile index 53bb86fa..88e45ae5 100644 --- a/Gemfile +++ b/Gemfile @@ -14,8 +14,8 @@ end gem "ffi" gem "rake" -gem "seven_zip_ruby" gem "sassc" +gem "seven_zip_ruby" group :development do gem "byebug" From 1b9913cf61fe9d6f56844e4e0f7bd82d38cdf4d3 Mon Sep 17 00:00:00 2001 From: Maxim Samsonov Date: Wed, 26 Jan 2022 11:24:29 +0300 Subject: [PATCH 4/9] Tebako tag fixed --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 86d7564d..a4e10d05 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ test-flavor: .archive/tebako/.git: mkdir -p .archive; - git clone -b "maxirmx_v0.3.2" https://github.com/tamatebako/tebako $(dir $@) + git clone -b "v0.3.2" https://github.com/tamatebako/tebako $(dir $@) .archive/tebako/bin/tebako: .archive/tebako/.git From 65a24865a9134881a23cabfc9e0b1ae098945122 Mon Sep 17 00:00:00 2001 From: "Maxim [maxirmx] Samsonov" Date: Fri, 28 Jan 2022 19:10:41 +0300 Subject: [PATCH 5/9] Added semaphore for sassc load_path processing --- bin/metanorma | 56 +++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/bin/metanorma b/bin/metanorma index b6d6370b..4b76bcab 100644 --- a/bin/metanorma +++ b/bin/metanorma @@ -156,6 +156,38 @@ unless Gem.win_platform? # because on windows we use ocra FileUtils.cp(sevenz_path, COMPILER_MEMFS_LIB_CACHE / 'seven_zip_ruby') $LOAD_PATH.unshift(COMPILER_MEMFS_LIB_CACHE) # END of HACK + + # HACK unpack style files for sassc + require 'sassc' + + module SassC + class Engine + @@loaded_pathes = [] + @@loaded_pathes_semaphore = Mutex::new + def load_paths() + paths = (@options[:load_paths] || []) + SassC.load_paths + np = [] + paths.each { |p| + if p.start_with?(COMPILER_MEMFS) + m = p.sub(COMPILER_MEMFS, COMPILER_MEMFS_LIB_CACHE.to_s) + @@loaded_pathes_semaphore.synchronize { + unless @@loaded_pathes.include?(m) + FileUtils.mkdir_p(m) + FileUtils.cp_r(File.join(p, "."), m) if File.exists?(p) + @@loaded_pathes << m + end + } + np << m + else + np << p + end + } + np.join(File::PATH_SEPARATOR) unless np.empty? + end + end + end +# END of HACK/sassc + end if Gem.win_platform? @@ -178,30 +210,6 @@ if Gem.win_platform? require 'ffi-libarchive-binary' # to preload libarchive-13.dll end -# HACK unpack style files for sassc -require 'sassc' - -module SassC - class Engine - def load_paths() - paths = (@options[:load_paths] || []) + SassC.load_paths - np = [] - paths.each { |p| - if p.start_with?(COMPILER_MEMFS) - m = p.sub(COMPILER_MEMFS, COMPILER_MEMFS_LIB_CACHE.to_s) - FileUtils.cp_r(File.join(p, "."), m) if File.exists?(p) - np << m - else - np << p - end - } - np.join(File::PATH_SEPARATOR) unless np.empty? - end - end -end -# END of HACK - - Net::HTTP.class_eval do alias _use_ssl= use_ssl= From 0ae79b066a06fa48214a4b779675c3c867b763ba Mon Sep 17 00:00:00 2001 From: "Maxim [maxirmx] Samsonov" Date: Sat, 29 Jan 2022 15:58:51 +0300 Subject: [PATCH 6/9] Test with refactored dirent implementation --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- Makefile | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c04d8f40..44463f0a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -27,7 +27,7 @@ env: TEBAKO_DIR: .archive/tebako DEPS: deps # Versions - TEBAKO_TAG: "v0.3.2" + TEBAKO_TAG: "maxirmx_v0.3.3" RUBY_VER: "2.7.5" RUBY_HASH: "2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1" BUNDLER_VER: "2.2.3" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 653a6cd4..6d749e60 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -26,7 +26,7 @@ env: TEBAKO_DIR: .archive/tebako DEPS: deps # Versions - TEBAKO_TAG: "v0.3.2" + TEBAKO_TAG: "maxirmx_v0.3.3" RUBY_VER: "2.7.5" RUBY_HASH: "2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1" BUNDLER_VER: "2.2.3" diff --git a/Makefile b/Makefile index a4e10d05..992c5e7d 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ TEST_FLAVOR ?= iso TEST_PROCESSORS ?= iso cc iec un m3aawg jcgm csa bipm iho ogc itu ietf BUILD_DIR := build +TEBAKO_TAG := maxirmx_v0.3.3 all: $(BUILD_DIR)/bin/metanorma-$(PLATFORM)-$(ARCH) @@ -49,7 +50,7 @@ test-flavor: .archive/tebako/.git: mkdir -p .archive; - git clone -b "v0.3.2" https://github.com/tamatebako/tebako $(dir $@) + git clone -b "$(TEBAKO_TAG)" https://github.com/tamatebako/tebako $(dir $@) .archive/tebako/bin/tebako: .archive/tebako/.git From c1533c6d06f5fc480a3d09b53279b8d901f0b1fe Mon Sep 17 00:00:00 2001 From: "Maxim [maxirmx] Samsonov" Date: Sat, 29 Jan 2022 18:29:47 +0300 Subject: [PATCH 7/9] tebako v0.3.3 --- .github/workflows/linux.yml | 6 +++--- .github/workflows/macos.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 44463f0a..f28d3f89 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,7 @@ on: workflow_dispatch: env: - CACHE_VER: 05 + CACHE_VER: 06 OS_VER: "ubuntu-18.04" BUILD_TYPE: Release CC: clang @@ -77,7 +77,7 @@ jobs: ./configure --prefix='/usr' make sudo make install - + - name: Checkout tebako packaging environment uses: actions/checkout@v2 with: @@ -146,7 +146,7 @@ jobs: ./configure --prefix='/usr' make sudo make install - + - name: Install Ruby uses: ruby/setup-ruby@v1 with: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 6d749e60..9ee68e28 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,7 +18,7 @@ on: workflow_dispatch: env: - CACHE_VER: "03" + CACHE_VER: 04 BUILD_TYPE: Release CC: clang CXX: clang++ From bba34203f06f3014482f39cbe843f53465048f2d Mon Sep 17 00:00:00 2001 From: "Maxim [maxirmx] Samsonov" Date: Sun, 30 Jan 2022 00:16:01 +0300 Subject: [PATCH 8/9] tebako v0.3.3 cache bump --- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 4 ++-- Makefile | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f28d3f89..fc3ad107 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,7 @@ on: workflow_dispatch: env: - CACHE_VER: 06 + CACHE_VER: 07 OS_VER: "ubuntu-18.04" BUILD_TYPE: Release CC: clang @@ -27,7 +27,7 @@ env: TEBAKO_DIR: .archive/tebako DEPS: deps # Versions - TEBAKO_TAG: "maxirmx_v0.3.3" + TEBAKO_TAG: "v0.3.3" RUBY_VER: "2.7.5" RUBY_HASH: "2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1" BUNDLER_VER: "2.2.3" diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 9ee68e28..26f86d7e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,7 +18,7 @@ on: workflow_dispatch: env: - CACHE_VER: 04 + CACHE_VER: 05 BUILD_TYPE: Release CC: clang CXX: clang++ @@ -26,7 +26,7 @@ env: TEBAKO_DIR: .archive/tebako DEPS: deps # Versions - TEBAKO_TAG: "maxirmx_v0.3.3" + TEBAKO_TAG: "v0.3.3" RUBY_VER: "2.7.5" RUBY_HASH: "2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1" BUNDLER_VER: "2.2.3" diff --git a/Makefile b/Makefile index 992c5e7d..75b991fd 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ TEST_FLAVOR ?= iso TEST_PROCESSORS ?= iso cc iec un m3aawg jcgm csa bipm iho ogc itu ietf BUILD_DIR := build -TEBAKO_TAG := maxirmx_v0.3.3 +TEBAKO_TAG := v0.3.3 all: $(BUILD_DIR)/bin/metanorma-$(PLATFORM)-$(ARCH) From 790922c5f1350bdf1699c82830d4e5f18ff70d49 Mon Sep 17 00:00:00 2001 From: "Maxim [maxirmx] Samsonov" Date: Sun, 30 Jan 2022 01:39:30 +0300 Subject: [PATCH 9/9] Ignore errors for ogc test on linux --- .github/workflows/linux.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index fc3ad107..76794aa9 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -216,7 +216,6 @@ jobs: - csa - bipm - ietf - - ogc include: - os: ubuntu-18.04 test-flavor: m3aawg @@ -230,6 +229,9 @@ jobs: - os: ubuntu-18.04 test-flavor: iho ignore-errors: true + - os: ubuntu-18.04 + test-flavor: ogc + ignore-errors: true - os: ubuntu-20.04 test-flavor: m3aawg ignore-errors: true @@ -242,6 +244,9 @@ jobs: - os: ubuntu-20.04 test-flavor: iho ignore-errors: true + - os: ubuntu-20.04 + test-flavor: ogc + ignore-errors: true steps: - uses: actions/checkout@v2