Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions 43 .github/actions/install-mono/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 'Install Mono'
description: 'Install Mono'
branding:
icon: package
color: blue
inputs:
arch:
description: Architecture to install for
required: true
runs:
using: "composite"
steps:
- name: Install on macOS (x86_64)
if: runner.os == 'macOS' && inputs.arch == 'x64'
run: |
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 /usr/local/bin/brew install mono
shell: sh

- name: Install on macOS
if: runner.os == 'macOS' && inputs.arch != 'x64'
run: |
brew update
brew install mono
shell: sh

- name: Install on Linux
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y mono-runtime-sgen
shell: sh

- name: Install on Windows (x86)
if: runner.os == 'Windows' && inputs.arch == 'x86'
run: choco install --x86 -y mono
shell: sh

- name: Install on Windows
if: runner.os == 'Windows' && inputs.arch != 'x86'
run: choco install -y mono
shell: sh

46 changes: 30 additions & 16 deletions 46 .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,42 @@ jobs:
matrix:
os:
# Disabled for now, will require some work (#2653)
# The main issue is setup-dotnet stubbornly installing for x64 only
#
# - category: windows
# platform: x86
# instance: windows-latest
# suffix: -windows-x86-none

- category: windows
platform: x64
instance: windows-latest
suffix: -windows-x86_64-none

- category: ubuntu
platform: x64
instance: ubuntu-22.04
suffix: ""

- category: ubuntu
platform: arm64
instance: ubuntu-22.04-arm
suffix: ""

- category: macos
platform: x64
instance: macos-13
instance: macos-15
suffix: -macos-x86_64-none

python: ["3.10", "3.11", "3.12", "3.13"]
- category: macos
platform: arm64
instance: macos-15
suffix: -macos-aarch64-none

python: ["3.10", "3.11", "3.12", "3.13"]
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- name: Set Environment on macOS
uses: maxim-lobanov/setup-xamarin@v1
if: ${{ matrix.os.category == 'macos' }}
with:
mono-version: latest

- name: Checkout code
uses: actions/checkout@v6

Expand All @@ -55,33 +61,41 @@ jobs:
with:
dotnet-version: '8.0.x'

- name: Setup upterm session
uses: owenthereal/action-upterm@v1
if: ${{ matrix.os.category == 'macos' }}
with:
## Shut down the server if unconnected after 5 minutes.
limit-access-to-actor: true
wait-timeout-minutes: 15

- name: Install Mono
uses: ./.github/actions/install-mono
with:
arch: ${{ matrix.os.platform }}

- name: Set up Python ${{ matrix.python }}
uses: astral-sh/setup-uv@v7
with:
architecture: ${{ matrix.os.platform }}
python-version: ${{ matrix.python }}
python-version: cpython-${{ matrix.python }}${{ matrix.os.suffix }}
cache-python: true
activate-environment: true
enable-cache: true

- run: dotnet restore

- name: Synchronize the virtual environment
run: uv sync --managed-python

- name: Show pyvenv.cfg
run: cat .venv/pyvenv.cfg

- name: Embedding tests (Mono/.NET Framework)
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net472 --logger "console;verbosity=detailed" src/embed_tests/
if: always()
env:
MONO_THREADS_SUSPEND: preemptive # https://github.com/mono/mono/issues/21466

- name: Embedding tests (.NET Core)
run: dotnet test --runtime any-${{ matrix.os.platform }} --framework net8.0 --logger "console;verbosity=detailed" src/embed_tests/
if: always()

- name: Python Tests (Mono)
if: ${{ matrix.os.category != 'windows' }}
run: pytest --runtime mono

- name: Python Tests (.NET Core)
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.