Skip to content

Commit

Permalink
Update djinni_build and djinni-cmake
Browse files Browse the repository at this point in the history
- Updated djinni_build to v2.0.0
- Updated djinni-cmake to v1.1.0
- Adapted package structure in lib/package/<platform>/package to the new requirements
  by djinni_build
- Updated github actions to build debug libraries to demonstrate new debugging
  capabilities introduced in djinni_build v2.0.0
- Moved development documentation from README to separate page
- Updated doxygen to v.1.9.4
- Updated doxygen-awesome-css to v2.1.0
- Update target platform profiles based on my latest learnings
- pinned XCode version in github action for a reliable build
- pinned Conan version in requirements.txt for a reliable build
  • Loading branch information
jothepro committed Oct 6, 2022
1 parent c29d103 commit c04e7a9
Show file tree
Hide file tree
Showing 39 changed files with 414 additions and 361 deletions.
96 changes: 57 additions & 39 deletions .github/workflows/build-test-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,15 @@ env:
SWIFTPACKAGE_REPOSITORY: djinni-library-template-swiftpackage
SWIFTPACKAGE_REPOSITORY_USERNAME: jothepro
SWIFTPACKAGE_REPOSITORY_PASSWORD: ${{ secrets.REPOSITORY_ACCESS_TOKEN }}
# Compile time environment settings
XCODE_VERSION: 13.4.1
GCC_VERSION: 11
PYTHON_VERSION: '3.10'

jobs:
version:
name: get version
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -51,31 +54,35 @@ jobs:
name: Build & test
strategy:
matrix:
os: [ubuntu-20.04, macos-11, windows-2022]
os: [ubuntu-20.04, macos-12, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Set up Python 3.10
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install Conan
uses: turtlebrowser/get-conan@main
- name: Set up GCC 11
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python requirements
run: pip install -r requirements.txt
- name: Select wanted Xcode Version
if: runner.os == 'macOS'
run: sudo xcode-select --switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Set up GCC
if: runner.os == 'Linux'
uses: egor-tensin/setup-gcc@v1
with:
version: 11
version: ${{ env.GCC_VERSION }}
- name: Detect Conan profile
run: conan profile new default --detect
- name: Configure Conan profile
if: runner.os == 'Linux'
run: |
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
conan profile update settings.compiler.version=11 default
conan profile update settings.compiler.version=${{ env.GCC_VERSION }} default
- name: Conan install
run: conan install --build=missing -if build .
- name: Conan build & test
Expand All @@ -87,18 +94,18 @@ jobs:
needs:
- test
- version
if: github.event_name == 'release'
env:
VERSION: ${{ needs.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.10
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Java 11
uses: actions/[email protected]
with:
Expand All @@ -107,17 +114,19 @@ jobs:
- name: Install Python requirements
run: pip install -r requirements.txt
- name: configure, build and package
run: ./build.py --android x86 x86_64 armv7 armv8 --configuration release --package aar
run: ./build.py --android x86 x86_64 armv7 armv8 --configuration debug --package aar
- name: publish
run: ./gradlew publish
working-directory: lib/platform/android/package/
if: github.event_name == 'release'
run: ./gradlew publishDebugPublicationToMavenRepository -Pversion=$VERSION
working-directory: build/android/package/
- name: set version to Doxyfile
run: echo "PROJECT_NUMBER = $VERSION" >> Doxyfile-Java
- name: generate documentation
uses: mattnotmitt/[email protected].3
uses: mattnotmitt/[email protected].4
with:
doxyfile-path: 'Doxyfile-Java'
- name: Publish generated docs to GitHub Pages
if: github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: docs/generated/html/java
Expand All @@ -127,41 +136,46 @@ jobs:

build_darwin:
name: Package for Darwin (swiftpackage)
runs-on: macos-11
runs-on: macos-12
needs:
- test
- version
if: github.event_name == 'release'
env:
VERSION: ${{ needs.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.10
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python requirements
run: pip install -r requirements.txt
- name: Select wanted Xcode Version
run: sudo xcode-select --switch /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: configure, build and package
run: ./build.py --macos x86_64 armv8 --iphonesimulator x86_64 armv8 --iphoneos armv8 --package xcframework swiftpackage --configuration release
run: ./build.py --macos x86_64 armv8 --iphonesimulator x86_64 armv8 --iphoneos armv8 --package xcframework swiftpackage --configuration debug
- name: publish
if: github.event_name == 'release'
run: |
GIT_URL=https://$SWIFTPACKAGE_REPOSITORY_USERNAME:$SWIFTPACKAGE_REPOSITORY_PASSWORD@$SWIFTPACKAGE_GITSERVER/$SWIFTPACKAGE_REPOSITORY.git
git clone --depth 1 $GIT_URL
rm -r $SWIFTPACKAGE_REPOSITORY/bin/* && cp -r swiftpackage/* $SWIFTPACKAGE_REPOSITORY && cd $SWIFTPACKAGE_REPOSITORY
rm -r $SWIFTPACKAGE_REPOSITORY/bin/* && cp -r darwin/swiftpackage/* $SWIFTPACKAGE_REPOSITORY && cd $SWIFTPACKAGE_REPOSITORY
git add . && git commit -m "version $VERSION" && git tag $VERSION
git push && git push --tags
working-directory: build/
- name: set version to Doxyfile
run: echo "PROJECT_NUMBER = $VERSION" >> Doxyfile-ObjC
- name: generate documenation
run: |
brew install doxygen graphviz
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/41828ee36b96e35b63b2a4c8cfc2df2c3728944a/Formula/doxygen.rb # v1.9.4
brew install graphviz doxygen.rb
doxygen Doxyfile-ObjC
- name: Publish generated docs to GitHub Pages
if: github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: docs/generated/html/objc
Expand All @@ -175,36 +189,38 @@ jobs:
needs:
- test
- version
if: github.event_name == 'release'
env:
VERSION: ${{ needs.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.10
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python requirements
run: pip install -r requirements.txt
- name: configure, build and package
run: python3 ./build.py --windows x86 x86_64 armv7 armv8 --package nuget --configuration release
run: python3 ./build.py --windows x86 x86_64 armv7 armv8 --package nuget --configuration debug
- name: publish
if: github.event_name == 'release'
run: |
nuget sources add -Name nuget_server -Source $env:NUGET_REPOSITORY -username $env:NUGET_USERNAME -password $env:NUGET_PASSWORD
nuget push MyDjinniLibrary.$env:VERSION.nupkg -Source nuget_server -ApiKey $env:NUGET_PASSWORD
working-directory: build/windows/
nuget push MyDjinniLibrary.$env:VERSION.symbols.nupkg -Source nuget_server -ApiKey $env:NUGET_PASSWORD
working-directory: build/windows/package
- name: set version to Doxyfile
run: echo "PROJECT_NUMBER = $env:VERSION" | Out-File -FilePath Doxyfile-CppCli -Encoding utf-8 -Append
- name: generate documentation
run: |
choco install doxygen.install --version 1.9.3.20220106
choco install graphviz --version 2.49.3
choco install doxygen.install --version 1.9.4
choco install graphviz --version 3.0.0
refreshenv
& "C:\Program Files\doxygen\bin\doxygen.exe" Doxyfile-CppCli
- name: Publish generated docs to GitHub Pages
if: github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: docs/generated/html/cppcli
Expand All @@ -218,37 +234,39 @@ jobs:
needs:
- test
- version
if: github.event_name == 'release'
env:
VERSION: ${{ needs.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.10
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python requirements
run: pip install -r requirements.txt
- name: Set up GCC 11
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 11
version: ${{ env.GCC_VERSION }}
- name: configure, build and package
run: ./build.py --linux x86 x86_64 armv7 armv8 --package conan --configuration release
run: ./build.py --linux x86 x86_64 armv7 armv8 --package conan --configuration debug
- name: publish
if: github.event_name == 'release'
run: |
conan remote add conan_repository $CONAN_REPOSITORY
conan upload my_djinni_library/$VERSION@jothepro/release --all --remote=conan_repository
- name: set version to Doxyfile
run: echo "PROJECT_NUMBER = $VERSION" >> Doxyfile-Cpp
- name: generate documentation
uses: mattnotmitt/[email protected].3
uses: mattnotmitt/[email protected].4
with:
doxyfile-path: 'Doxyfile-Cpp'
- name: Publish generated docs to GitHub Pages
if: github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: docs/generated/html/cpp
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ VERSION
.idea
/cmake-build-*
/build/
.vscode
.vscode
3 changes: 2 additions & 1 deletion Doxyfile-Cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,8 @@ HTML_EXTRA_STYLESHEET = docs/doxygen-awesome-css/doxygen-awesome.css \

HTML_EXTRA_FILES = docs/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \
docs/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js \
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js \
docs/doxygen-awesome-css/doxygen-awesome-interactive-toc.js


# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
Expand Down
3 changes: 2 additions & 1 deletion Doxyfile-CppCli
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,8 @@ HTML_EXTRA_STYLESHEET = docs/doxygen-awesome-css/doxygen-awesome.css \

HTML_EXTRA_FILES = docs/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \
docs/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js \
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js \
docs/doxygen-awesome-css/doxygen-awesome-interactive-toc.js


# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
Expand Down
3 changes: 2 additions & 1 deletion Doxyfile-Java
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,8 @@ HTML_EXTRA_STYLESHEET = docs/doxygen-awesome-css/doxygen-awesome.css \

HTML_EXTRA_FILES = docs/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \
docs/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js \
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js \
docs/doxygen-awesome-css/doxygen-awesome-interactive-toc.js


# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
Expand Down
3 changes: 2 additions & 1 deletion Doxyfile-ObjC
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,8 @@ HTML_EXTRA_STYLESHEET = docs/doxygen-awesome-css/doxygen-awesome.css \

HTML_EXTRA_FILES = docs/doxygen-awesome-css/doxygen-awesome-darkmode-toggle.js \
docs/doxygen-awesome-css/doxygen-awesome-fragment-copy-button.js \
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js
docs/doxygen-awesome-css/doxygen-awesome-paragraph-link.js \
docs/doxygen-awesome-css/doxygen-awesome-interactive-toc.js


# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
Expand Down
Loading

0 comments on commit c04e7a9

Please sign in to comment.