Skip to content

Commit

Permalink
CI: Rearrange CI into a single pr-precheck file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamievlin committed Aug 25, 2024
1 parent 0c6c890 commit f92cb62
Show file tree
Hide file tree
Showing 6 changed files with 121 additions and 97 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: build-asy-cxx
name: build-asy-cxx-linux
on:
workflow_call:
workflow_dispatch:
pull_request:
branches:
- "master"
- "a/*"

jobs:
configure-linux-release-x64:
runs-on: "ubuntu-22.04"
Expand Down Expand Up @@ -62,48 +60,6 @@ jobs:
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@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Download test artifacts
uses: actions/download-artifact@v4
with:
name: asy-testfiles
path: cmake-build-linux/release/
- name: Download artifacts for gtest
uses: actions/download-artifact@v4
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@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: asy-buildfiles
path: cmake-build-linux/release/
- name: Download test artifacts
uses: actions/download-artifact@v4
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)"
linux-asy-docgen:
runs-on: "ubuntu-22.04"
needs: build-linux-release-x64
Expand Down Expand Up @@ -144,7 +100,7 @@ jobs:
cmake-build-linux/release/docbuild/TeXShopAndAsymptote.pdf
cmake-build-linux/release/docbuild/latexusage.pdf
package-asymptote-artifacts:
needs: [test-x64-cxxtests, test-x64-asy-tests, linux-asy-docgen]
needs: [linux-asy-docgen]
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
Expand Down
48 changes: 3 additions & 45 deletions .github/workflows/build-asy-windows.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: build-asy-cxx-windows
on:
workflow_call:
workflow_dispatch:
pull_request:
branches:
- "master"
- "a/*"

env:
pwsh_initialize_devenv: |
$VsInfo = Get-CimInstance MSFT_VSInstance -Namespace root/cimv2/vs
Expand Down Expand Up @@ -127,48 +125,8 @@ jobs:
cmake-build-msvc/release/docbuild/TeXShopAndAsymptote.pdf
cmake-build-msvc/release/docbuild/asyRefCard.pdf
cmake-build-msvc/release/docbuild/latexusage.pdf
test-windows-msvc-x64-cxxtests:
needs: build-windows-msvc-x64
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-windows-env
- name: Download test artifacts
uses: actions/download-artifact@v4
with:
name: asy-win-x64-testfiles
path: cmake-build-msvc/release/
- name: Download artifacts for gtest
uses: actions/download-artifact@v4
with:
name: asy-win-x64-gtest-files
path: cmake-build-msvc/release/cxxtests
- name: google test
run: ctest --test-dir cmake-build-msvc/release -R "^cxxtests."
test-windows-msvc-x64-asy-tests:
needs: build-windows-msvc-x64
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-windows-env
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: asy-win-x64-buildfiles
path: cmake-build-msvc/release/
- name: Download test artifacts
uses: actions/download-artifact@v4
with:
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)"
package-asymptote-artifacts-win:
needs: [ test-windows-msvc-x64-cxxtests, test-windows-msvc-x64-asy-tests ]
needs: [ build-windows-msvc-x64 ]
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/build-gui.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: build-gui
on:
workflow_dispatch:
pull_request:
branches:
- "master"
- "a/*"
workflow_call:

jobs:
build-gui-linux:
runs-on: "ubuntu-22.04"
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pull-req-precheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: pull-request-precheck

on:
workflow_dispatch:
pull_request:
branches:
- "master"
- "a/*"

jobs:
build-asy-linux:
uses: ./.github/workflows/build-asy-linux.yml
build-asy-windows:
uses: ./.github/workflows/build-asy-windows.yml
test-asy-linux:
needs: [build-asy-linux]
uses: ./.github/workflows/test-asy-linux.yml
test-asy-windows:
needs: [build-asy-windows]
uses: ./.github/workflows/test-asy-windows.yml
build-gui:
uses: ./.github/workflows/build-gui.yml
46 changes: 46 additions & 0 deletions .github/workflows/test-asy-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: test-asy-windows
on:
workflow_call:

# this job is meant to be called once build-asy-linux is done
jobs:
test-x64-cxxtests:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Download test artifacts
uses: actions/download-artifact@v4
with:
name: asy-testfiles
path: cmake-build-linux/release/
- name: Download artifacts for gtest
uses: actions/download-artifact@v4
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:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-linux-env
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: asy-buildfiles
path: cmake-build-linux/release/
- name: Download test artifacts
uses: actions/download-artifact@v4
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)"
44 changes: 44 additions & 0 deletions .github/workflows/test-asy-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: test-asy-windows
on:
workflow_call:

# this is to be run after build-asy-windows is completed
jobs:
test-windows-msvc-x64-cxxtests:
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-windows-env
- name: Download test artifacts
uses: actions/download-artifact@v4
with:
name: asy-win-x64-testfiles
path: cmake-build-msvc/release/
- name: Download artifacts for gtest
uses: actions/download-artifact@v4
with:
name: asy-win-x64-gtest-files
path: cmake-build-msvc/release/cxxtests
- name: google test
run: ctest --test-dir cmake-build-msvc/release -R "^cxxtests."
test-windows-msvc-x64-asy-tests:
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: ./.github/actions/initialize-windows-env
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: asy-win-x64-buildfiles
path: cmake-build-msvc/release/
- name: Download test artifacts
uses: actions/download-artifact@v4
with:
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)"

0 comments on commit f92cb62

Please sign in to comment.