Skip to content

Commit d0c12ff

Browse files
baggepinnenclaude
andcommitted
Add CI workflow
Mirrors the MultibodyComponents CI: self-hosted runner, private JuliaHub registries, and the test suite run under a virtual display. Includes a temporary step that takes MultibodyComponents from its main branch, since the models require the BodyShape center-of-mass fix (JuliaComputing/MultibodyComponents.jl#150) which is not yet in any registered release; remove the step and bump the compat bound once a fixed release is registered. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 79089cc commit d0c12ff

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- "*"
9+
pull_request:
10+
11+
env:
12+
JULIA_PKG_SERVER: internal.juliahub.com
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
test:
20+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
21+
22+
runs-on: self-hosted
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
version:
28+
- "1.12"
29+
os:
30+
- self-hosted
31+
arch:
32+
- x64
33+
34+
steps:
35+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
36+
37+
- uses: julia-actions/setup-julia@4c0cb0fce8556fdb04a90347310e5db8b1f98fb9 # v2.7.0
38+
with:
39+
version: ${{ matrix.version }}
40+
arch: ${{ matrix.arch }}
41+
42+
- name: "Set up private JuliaHub registries"
43+
uses: "JuliaComputing/set-up-private-juliahub-registries@2f465506027adbe8086afc41dd3514e9020d1577" # v2.0.0
44+
with:
45+
encoded-juliahub-token: "${{ secrets.JULIAHUB_TOKEN_ENCODED }}"
46+
ssh-key: "${{ secrets.JULIASIM_REGISTRY_SSH_KEY }}"
47+
enable-JSMLComponents: "true"
48+
enable-JuliaHubRegistry: "true"
49+
50+
# TEMPORARY: the 3D models require the BodyShape center-of-mass fix
51+
# (JuliaComputing/MultibodyComponents.jl#150), which is not yet in any
52+
# registered MultibodyComponents release. Remove this step and bump the
53+
# MultibodyComponents compat bound once a release containing the fix is
54+
# registered.
55+
- name: Use MultibodyComponents from main (pending release with BodyShape fix)
56+
run: julia --project=. -e 'using Pkg; Pkg.add(url="git@github.com:JuliaComputing/MultibodyComponents.jl.git", rev="main")'
57+
env:
58+
JULIA_PKG_USE_CLI_GIT: "true"
59+
60+
- uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1
61+
62+
- name: Run tests with virtual display
63+
run: DISPLAY=:0 xvfb-run --auto-servernum -s '-screen 0 1024x768x24' julia --project -e 'using Pkg; Pkg.test()'

0 commit comments

Comments
 (0)