Add CI workflow #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*" | |
| pull_request: | |
| env: | |
| JULIA_PKG_SERVER: internal.juliahub.com | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
| runs-on: self-hosted | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: | |
| - "1.12" | |
| os: | |
| - self-hosted | |
| arch: | |
| - x64 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: julia-actions/setup-julia@4c0cb0fce8556fdb04a90347310e5db8b1f98fb9 # v2.7.0 | |
| with: | |
| version: ${{ matrix.version }} | |
| arch: ${{ matrix.arch }} | |
| - name: "Set up private JuliaHub registries" | |
| uses: "JuliaComputing/set-up-private-juliahub-registries@2f465506027adbe8086afc41dd3514e9020d1577" # v2.0.0 | |
| with: | |
| encoded-juliahub-token: "${{ secrets.JULIAHUB_TOKEN_ENCODED }}" | |
| ssh-key: "${{ secrets.JULIASIM_REGISTRY_SSH_KEY }}" | |
| enable-JSMLComponents: "true" | |
| enable-JuliaHubRegistry: "true" | |
| # TEMPORARY: the 3D models require the BodyShape center-of-mass fix | |
| # (JuliaComputing/MultibodyComponents.jl#150), which is not yet in any | |
| # registered MultibodyComponents release. Remove this step and bump the | |
| # MultibodyComponents compat bound once a release containing the fix is | |
| # registered. | |
| - name: Use MultibodyComponents from main (pending release with BodyShape fix) | |
| run: julia --project=. -e 'using Pkg; Pkg.add(url="git@github.com:JuliaComputing/MultibodyComponents.jl.git", rev="main")' | |
| env: | |
| JULIA_PKG_USE_CLI_GIT: "true" | |
| - uses: julia-actions/julia-buildpkg@e3eb439fad4f9aba7da2667e7510e4a46ebc46e1 # v1 | |
| - name: Run tests with virtual display | |
| run: DISPLAY=:0 xvfb-run --auto-servernum -s '-screen 0 1024x768x24' julia --project -e 'using Pkg; Pkg.test()' |