Skip to content

Commit

Permalink
Merge pull request #88 from as-ascii/arm64_osx_dynamic
Browse files Browse the repository at this point in the history
Add arm64-osx-dynamic triplet to continuous integration to support Apple Silicon platforms (M1, M2, M3 etc)
  • Loading branch information
as-ascii committed Jan 25, 2024
2 parents 4979923 + 96c4dac commit 59a72ad
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 7 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,34 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2019, macos-12]
triplet: [x64-linux-dynamic, x64-windows, x64-osx-dynamic]
os: [ubuntu-22.04, windows-2019, macos-12, flyci-macos-large-latest-m1]
triplet: [x64-linux-dynamic, x64-windows, x64-osx-dynamic, arm64-osx-dynamic]
sanitizer: ["", "address", "thread"]
exclude:
- os: ubuntu-22.04
triplet: x64-windows
- os: ubuntu-22.04
triplet: x64-osx-dynamic
- os: ubuntu-22.04
triplet: arm64-osx-dynamic
- os: windows-2019
triplet: x64-linux-dynamic
- os: windows-2019
triplet: x64-osx-dynamic
- os: windows-2019
triplet: arm64-osx-dynamic
- os: macos-12
triplet: x64-linux-dynamic
- os: macos-12
triplet: x64-windows
- os: macos-12
triplet: arm64-osx-dynamic
- os: flyci-macos-large-latest-m1
triplet: x64-linux-dynamic
- os: flyci-macos-large-latest-m1
triplet: x64-windows
- os: flyci-macos-large-latest-m1
triplet: x64-osx-dynamic
name: ${{ matrix.triplet }}${{ matrix.sanitizer != '' && format('-{0}-sanitizer', matrix.sanitizer) || '' }}
runs-on: ${{ matrix.os }}
timeout-minutes: 150
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,9 @@ vcpkg overlay add docwire/ports
This command ensures that vcpkg adds the DocWire overlay for subsequent installations.

5. **Install DocWire:**
Now that the overlay is set up, you can use vcpkg to install the DocWire library:
Now that the overlay is set up, you can use vcpkg to install the DocWire library (see compatibility note for supported platforms/triplets):
```
vcpkg install docwire
vcpkg install docwire:x64-linux-dynamic
```
6. **Download Binary Archives (Alternative):**
As an alternative to building from source, users can also download pre-built binary archives that contain the results of the vcpkg export command for DocWire. These archives can be found in the "Releases" section of the DocWire GitHub repository.
Expand All @@ -503,7 +503,7 @@ cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake ..
You're all set! You've successfully installed the DocWire library using vcpkg. You can now use the DocWire library in your code to perform text extraction from documents.

### Compatibility Note
Please note that DocWire is currently compatible with vcpkg tagged as version 2023.11.20. While this version is recommended for use, be aware that updates may become available in the near future. Supported triplets are: x64-linux-dynamic, x64-windows and x64-osx-dynamic.
Please note that DocWire is currently compatible with vcpkg tagged as version 2023.11.20. While this version is recommended for use, be aware that updates may become available in the near future. Supported triplets are: x64-linux-dynamic, x64-windows, x64-osx-dynamic and arm64-osx-dynamic.

<a name="versioning"></a>
## Versioning
Expand Down
6 changes: 5 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ fi
cd ..

if [[ "$OSTYPE" == "darwin"* ]]; then
VCPKG_TRIPLET=x64-osx-dynamic
if [[ $(arch) == 'arm64' ]]; then
VCPKG_TRIPLET=arm64-osx-dynamic
else
VCPKG_TRIPLET=x64-osx-dynamic
fi
else
VCPKG_TRIPLET=x64-linux-dynamic
fi
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- Introduce github actions strategy matrix for CI jobs
- Enable Address and Thread sanitizers on all platforms
- Enable Address and Thread sanitizers in release builds when vcpkg port sanitizers feature flags are enabled
- Add arm64-osx-dynamic triplet to continuous integration to support Apple Silicon platforms (M1, M2, M3 etc)

## Version 2024.01.05

Expand Down
1 change: 1 addition & 0 deletions src/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ namespace
boost::algorithm::erase_all(normalized, "struct ");
boost::algorithm::replace_all(normalized, "(void)", "()");
boost::algorithm::replace_all(normalized, ", ", ",");
boost::algorithm::replace_all(normalized, "> >", ">>");
return normalized;
}
} // anonymous namespace
Expand Down
2 changes: 1 addition & 1 deletion tests/logging_dereferenceable.out.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{"timestamp":"<timestamp>","severity":"debug","file":"api_tests.cpp","line":"<line>","function":"void Logging_Dereferenceable_Test::TestBody()","thread_id":"<thread_id>","log":{"typeid":"std::optional<int>","dereferenced":1}},
{"timestamp":"<timestamp>","severity":"debug","file":"api_tests.cpp","line":"<line>","function":"void Logging_Dereferenceable_Test::TestBody()","thread_id":"<thread_id>","log":null},
{"timestamp":"<timestamp>","severity":"debug","file":"api_tests.cpp","line":"<line>","function":"void Logging_Dereferenceable_Test::TestBody()","thread_id":"<thread_id>","log":{"typeid":"std::unique_ptr<int,std::default_delete<int> >","dereferenced":1}},
{"timestamp":"<timestamp>","severity":"debug","file":"api_tests.cpp","line":"<line>","function":"void Logging_Dereferenceable_Test::TestBody()","thread_id":"<thread_id>","log":{"typeid":"std::unique_ptr<int,std::default_delete<int>>","dereferenced":1}},
{"timestamp":"<timestamp>","severity":"debug","file":"api_tests.cpp","line":"<line>","function":"void Logging_Dereferenceable_Test::TestBody()","thread_id":"<thread_id>","log":null},
{"timestamp":"<timestamp>","severity":"debug","file":"api_tests.cpp","line":"<line>","function":"void Logging_Dereferenceable_Test::TestBody()","thread_id":"<thread_id>","log":{"typeid":"std::shared_ptr<int>","dereferenced":1}},
{"timestamp":"<timestamp>","severity":"debug","file":"api_tests.cpp","line":"<line>","function":"void Logging_Dereferenceable_Test::TestBody()","thread_id":"<thread_id>","log":null}
Expand Down

0 comments on commit 59a72ad

Please sign in to comment.