Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into msvc-vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
jamievlin committed Dec 14, 2024
2 parents c7a5421 + 607b655 commit eed710a
Show file tree
Hide file tree
Showing 1,403 changed files with 371,559 additions and 2,256 deletions.
27 changes: 20 additions & 7 deletions .github/actions/initialize-linux-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,35 @@ description: Initialize environment
runs:
using: 'composite'
steps:
- name: Setup Ninja
uses: ashutoshvarma/[email protected]
with:
version: 1.10.0
- name: Update apt
shell: bash
run: sudo apt-get update
- name: Install ninja
shell: bash
run: sudo apt-get install ninja-build
- name: Setup build dependencies
shell: bash
run: |
sudo apt install \
sudo apt-get install \
libxinerama-dev libxcursor-dev xorg-dev \
libglu1-mesa-dev pkg-config libwayland-dev autopoint
sudo apt-get install ccache
- name: Set environment variables
shell: bash
run: |
echo VCPKG_ROOT="$VCPKG_INSTALLATION_ROOT" >> "$GITHUB_ENV"
echo CCACHE_DIR=/home/runner/.ccache >> "$GITHUB_ENV"
echo CCACHE_TEMP_DIR=/home/runner/.ccache >> "$GITHUB_ENV"
echo CCACHE_MAXSIZE=1G >> "$GITHUB_ENV"
- name: Cache Vcpkg
id: cache-vcpkg
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/vcpkg/archives
path: /home/runner/.cache/vcpkg/archives
key: ${{ runner.os }}-vcpkg-cache
- name: Cache ccache
id: cache-ccache
uses: actions/cache@v4
with:
path: /home/runner/.ccache
key: ${{ runner.os }}-ccache-cache
9 changes: 4 additions & 5 deletions .github/actions/initialize-windows-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ description: Initialize environment
runs:
using: 'composite'
steps:
- name: Setup Ninja
uses: ashutoshvarma/[email protected]
with:
version: 1.10.0
- name: Install ninja
shell: pwsh
run: choco install ninja -y
- name: Cache Vcpkg
id: cache-vcpkg
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~\AppData\Local\vcpkg\archives
key: ${{ runner.os }}-vcpkg-cache
157 changes: 157 additions & 0 deletions .github/workflows/build-asy-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
name: build-asy-cxx-linux
on:
workflow_call:
inputs:
version_override:
type: string
default: ""
workflow_dispatch:
inputs:
version_override:
type: string
description: Version override. If not given, will use the default value in configure.ac.
default: ""

jobs:
configure-linux-release-x64:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- run: |
ASY_VERSION_OVERRIDE="${{ inputs.version_override }}" cmake --preset linux/release-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
uses: actions/upload-artifact@v4
with:
name: cmake-linux-x64-release-cfg-tgz
path: cmake-linux-cfg-artifact.tar.gz
build-linux-release-x64:
needs: configure-linux-release-x64
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Download configuration artifacts
uses: actions/download-artifact@v4
with:
name: cmake-linux-x64-release-cfg-tgz
- name: Untar configuration artifact
run: tar -xzf cmake-linux-cfg-artifact.tar.gz
# Why we are defining version here and not in configuration stage is because cmake gets
# re-run here
- name: Generate version suffix
if: ${{ inputs.version_override == '' }}
run: |
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
- name: Archive build files
uses: actions/upload-artifact@v4
with:
name: asy-buildfiles
path: |
cmake-build-linux/release/asy
cmake-build-linux/release/base
- name: Archive misc files
uses: actions/upload-artifact@v4
with:
name: asy-miscfiles
path: |
cmake-build-linux/release/misc-output
- name: Build Asymptote google test files
run: cmake --build --preset linux/release --target asyCxxTests -j
- name: Archive Asymptote gtest files
uses: actions/upload-artifact@v4
with:
name: asy-gtest-files
path: |
cmake-build-linux/release/cxxtests/asyCxxTests
cmake-build-linux/release/cxxtests/*.cmake
- name: Archive Asymptote test files
uses: actions/upload-artifact@v4
with:
name: asy-testfiles
path: cmake-build-linux/release/CTest*.cmake
linux-asy-docgen:
runs-on: "ubuntu-22.04"
needs: build-linux-release-x64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: install dependencies
run: sudo apt-get install texlive texlive-latex-extra texinfo ghostscript
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: asy-buildfiles
path: cmake-build-linux/release/
- 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
- 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
- name: Archive asymptote.pdf
uses: actions/upload-artifact@v4
with:
name: asy-pdf-file
path: cmake-build-linux/release/docbuild/asymptote.pdf
- name: Archive remaining asymptote documentation
uses: actions/upload-artifact@v4
with:
name: asy-misc-docs
path: |
cmake-build-linux/release/docbuild/asy-latex.pdf
cmake-build-linux/release/docbuild/asymptote.sty
cmake-build-linux/release/docbuild/CAD.pdf
cmake-build-linux/release/docbuild/asyRefCard.pdf
cmake-build-linux/release/docbuild/TeXShopAndAsymptote.pdf
package-asymptote-artifacts:
needs: [linux-asy-docgen]
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: asy-buildfiles
path: tar-stage
- name: Download misc files
uses: actions/download-artifact@v4
with:
name: asy-miscfiles
path: tar-stage/misc/
- name: Download asymptote.pdf
uses: actions/download-artifact@v4
with:
name: asy-pdf-file
path: tar-stage/doc/
- name: Download remaining documentation files
uses: actions/download-artifact@v4
with:
name: asy-misc-docs
path: tar-stage/doc/
- name: Link examples directory to tar-stage
run: ln -sf ${{ github.workspace }}/examples ${{ github.workspace }}/tar-stage/examples
- name: Set asy's +x flag
run: chmod +x tar-stage/asy
- name: tar package
run: tar -C tar-stage -cvhf asymptote-build-linux.tar asy base examples doc misc
- name: Archive Asymptote test files
uses: actions/upload-artifact@v4
with:
name: asymptote-build-linux
path: asymptote-build-linux.tar
134 changes: 0 additions & 134 deletions .github/workflows/build-asy-main.yml
Original file line number Diff line number Diff line change
@@ -1,134 +0,0 @@
name: build-asy-cxx
on:
workflow_dispatch:
pull_request:
branches:
- "master"
- "a/*"
push:
branches:
- msvc-*
jobs:
configure-linux-release-x64:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- run: |
VCPKG_ROOT="$VCPKG_INSTALLATION_ROOT" \
cmake --preset linux/release
- 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
uses: actions/upload-artifact@v3
with:
name: cmake-linux-x64-release-cfg-tgz
path: cmake-linux-cfg-artifact.tar.gz
build-linux-release-x64:
needs: configure-linux-release-x64
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Download configuration artifacts
uses: actions/download-artifact@v3
with:
name: cmake-linux-x64-release-cfg-tgz
- name: Untar configuration artifact
run: tar -xzf cmake-linux-cfg-artifact.tar.gz
# Why we are defining version here and not in configuration stage is because cmake gets
# re-run here
- name: Generate version suffix
run: |
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: Archive build files
uses: actions/upload-artifact@v3
with:
name: asy-buildfiles
path: |
cmake-build-linux/release/asy
cmake-build-linux/release/base
- name: Build Asymptote google test files
run: cmake --build --preset linux/release --target asyCxxTests -j
- name: Archive Asymptote gtest files
uses: actions/upload-artifact@v3
with:
name: asy-gtest-files
path: |
cmake-build-linux/release/cxxtests/asyCxxTests
cmake-build-linux/release/cxxtests/*.cmake
- name: Archive Asymptote test files
uses: actions/upload-artifact@v3
with:
name: asy-testfiles
path: cmake-build-linux/release/CTest*.cmake
test-x64-cxxtests:
needs: build-linux-release-x64
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Download test artifacts
uses: actions/download-artifact@v3
with:
name: asy-testfiles
path: cmake-build-linux/release/
- name: Download artifacts for gtest
uses: actions/download-artifact@v3
with:
name: asy-gtest-files
path: cmake-build-linux/release/cxxtests
- run: chmod +x cmake-build-linux/release/cxxtests/asyCxxTests
- name: google test
run: ctest --test-dir cmake-build-linux/release -R "^cxxtests."
test-x64-asy-tests:
needs: build-linux-release-x64
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: asy-buildfiles
path: cmake-build-linux/release/
- name: Download test artifacts
uses: actions/download-artifact@v3
with:
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)"
package-asymptote-artifacts:
needs: [test-x64-cxxtests, test-x64-asy-tests]
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: asy-buildfiles
path: tar-stage
- name: Link examples directory to tar-stage
run: ln -sf ${{ github.workspace }}/examples ${{ github.workspace }}/tar-stage/examples
- name: Set asy's +x flag
run: chmod +x tar-stage/asy
- name: tar package
run: tar -C tar-stage -cvhf asymptote-build-linux.tar asy base examples
- name: Archive Asymptote test files
uses: actions/upload-artifact@v3
with:
name: asymptote-build-linux
path: asymptote-build-linux.tar
Loading

0 comments on commit eed710a

Please sign in to comment.