Skip to content

Commit

Permalink
Merge branch 'master' into perl2py.
Browse files Browse the repository at this point in the history
  • Loading branch information
johncbowman committed Feb 7, 2025
2 parents 6010f5d + 317e045 commit 71b27f8
Show file tree
Hide file tree
Showing 286 changed files with 16,120 additions and 12,993 deletions.
14 changes: 7 additions & 7 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
Expand All @@ -21,26 +21,26 @@ BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: Always
AfterControlStatement: false
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterUnion: true
BeforeCatch: false
BeforeElse: true
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BinPackArguments: false
ColumnLimit: 120
BinPackArguments: true
ColumnLimit: 80
CompactNamespaces: false
ContinuationIndentWidth: 8
IndentCaseLabels: true
IndentPPDirectives: None
IndentPPDirectives: AfterHash
IndentWidth: 2
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 2
Expand All @@ -49,7 +49,7 @@ ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Left
ReferenceAlignment: Left
ReflowComments: false
ReflowComments: true
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/initialize-linux-latex-and-gs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: initialize-env
description: Initialize environment
runs:
using: 'composite'
steps:
- name: Update apt
shell: bash
run: sudo apt-get update
- name: Install latex
shell: bash
run: sudo apt-get install texlive texlive-latex-extra texinfo
- name: Install ghostscript
shell: bash
run: sudo apt-get install ghostscript
11 changes: 5 additions & 6 deletions .github/workflows/build-asy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- run: |
ASY_VERSION_OVERRIDE="${{ inputs.version_override }}" cmake --preset linux/release-ccache
ASY_VERSION_OVERRIDE="${{ inputs.version_override }}" cmake --preset linux/release/ci/with-ccache
- name: tar+gz cmake configuration
run: tar -czf cmake-linux-cfg-artifact.tar.gz --exclude='vcpkg_installed' cmake-build-linux/release
- name: Upload configuration artifacts
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
echo set\(ASY_VERSION_SUFFIX \"/github-ci/ref=${{ github.sha }}\"\) > asy-pkg-version-suffix.cmake
- run: cmake --build --preset linux/release --target asy-with-basefiles -j
- name: build misc files
run: cmake --build --preset linux/release-ccache --target asy-dist-misc-files -j
run: cmake --build --preset linux/release/ci/with-ccache --target asy-dist-misc-files -j
- name: Archive build files
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -87,8 +87,7 @@ jobs:
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: install dependencies
run: sudo apt-get install texlive texlive-latex-extra texinfo ghostscript
- uses: ./.github/actions/initialize-linux-latex-and-gs
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -97,11 +96,11 @@ jobs:
- name: delete cache file
run: rm -f cmake-build-linux/release/CMakeCache.txt
- name: reconfigure with documentation
run: ASY_VERSION_OVERRIDE="${{ inputs.version_override }}" cmake --preset linux/release-ccache
run: ASY_VERSION_OVERRIDE="${{ inputs.version_override }}" cmake --preset linux/release/ci/with-ccache
- name: touch asymptote binary (to avoid need for rebuilding)
run: touch cmake-build-linux/release/asy
- name: build documentation
run: cmake --build --preset linux/release-ccache --target docgen -j
run: cmake --build --preset linux/release/ci/with-ccache --target docgen -j
- name: Archive asymptote.pdf
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-asy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
-Arch amd64 -HostArch amd64 -SkipAutomaticLocation
$env:VCPKG_ROOT = "$env:VCPKG_INSTALLATION_ROOT"
$env:ASY_VERSION_OVERRIDE = "${{ inputs.version_override }}"
cmake_msvc_profile: msvc/release-with-existing-asymptote-pdf
cmake_msvc_profile: msvc/release/ci/with-external-asymptote-pdf
jobs:
configure-windows-msvc-x64:
runs-on: "windows-2022"
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/linux-sanity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build-gui
on:
workflow_call:
workflow_dispatch:

jobs:
build-and-test-asy-compact-zero:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Configure and build asymptote with compact 0
run: |
cmake --preset linux/release/ci/with-ccache/compact-zero
cmake --build --preset linux/release/ci/with-ccache/compact-zero --target asy-with-basefiles -j
- uses: ./.github/actions/initialize-linux-latex-and-gs
- name: Run asy check tests
run: |
ctest --test-dir cmake-build-linux/release-compact-zero --output-on-failure -L "asy-check-tests"
3 changes: 3 additions & 0 deletions .github/workflows/pull-req-precheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
asyver="$(python3 generate_asy_ver_info.py --version-with-git-info)ci"
echo "Asymptote version is $asyver"
echo "asyver=$asyver" >> "$GITHUB_OUTPUT"
linux-sanity:
uses: ./.github/workflows/linux-sanity.yml
build-asy-linux:
needs: determine_asy_version
uses: ./.github/workflows/build-asy-linux.yml
Expand Down Expand Up @@ -55,6 +57,7 @@ jobs:
uses: ./.github/workflows/package-asy-installer-win.yml
precheck-pass: # this is a dummy step with the sole purpose of making the PR need only this job to pass
needs:
- linux-sanity
- test-asy-linux
- test-asy-windows
- package-asy-install-file
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test-asy-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,5 @@ jobs:
name: asy-testfiles
path: cmake-build-linux/release/
- run: chmod +x cmake-build-linux/release/asy
- name: asy test
run: ctest --test-dir cmake-build-linux/release -R "^asy\..*" -E "asy\.(gc\..*|pic\.trans|gs\.ghostscript)"
- name: wce test
run: ctest --test-dir cmake-build-linux/release -R "^wce"
- name: asy check tests
run: ctest --output-on-failure --test-dir cmake-build-linux/release -L "asy-check-tests"
4 changes: 1 addition & 3 deletions .github/workflows/test-asy-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,4 @@ jobs:
name: asy-win-x64-testfiles
path: cmake-build-msvc/release/
- name: asy test
run: ctest --test-dir cmake-build-msvc/release -R "^asy\..*" -E "asy\.(gc\..*|pic\.trans|gs\.ghostscript)"
- name: wce test
run: ctest --test-dir cmake-build-msvc/release -R "^wce"
run: ctest --output-on-failure --test-dir cmake-build-msvc/release -L "asy-check-tests"
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,13 @@ if (ENABLE_ASY_CXXTEST)
add_subdirectory(cxxtests)
endif()


# installation (on windows, pre-NSIS)
# installation
if (WIN32)
# on windows, pre-NSIS
include(cmake-scripts/win32-pre-nsis-installer.cmake)
else()
# on unix systems
if (NOT CTAN_BUILD)
include(cmake-scripts/linux-install.cmake)
endif()
endif()
Loading

0 comments on commit 71b27f8

Please sign in to comment.