Skip to content

Commit 23892cb

Browse files
committed
[WIP] Use frameworks via mopack
1 parent 7a218f5 commit 23892cb

5 files changed

Lines changed: 24 additions & 1 deletion

File tree

‎.github/workflows/build.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
python-version: ${{ matrix.python-version }}
114114
- name: Install Python dependencies
115115
run: |
116-
pip install git+https://github.com/jimporter/mopack.git '.[test]'
116+
pip install git+https://github.com/jimporter/mopack.git@framework '.[test]'
117117
- name: Initialize MSVC ${{ matrix.msvc-version }}
118118
if: startsWith(matrix.os, 'windows-')
119119
uses: ilammy/msvc-dev-cmd@v1

‎test/data/framework/build.bfg‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# -*- mode: python; mode: bfg9000 -*-
2+
3+
foundation = package('Foundation')
4+
5+
executable('hello', files=['main.m'], packages=[foundation])

‎test/data/framework/main.m‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#import <Foundation/Foundation.h>
2+
3+
int main() {
4+
NSLog(@"Hello World!");
5+
}

‎test/data/framework/mopack.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
packages:
2+
Foundation:
3+
origin: framework

‎test/integration/test_package.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,13 @@ def __init__(self, *args, **kwargs):
3131
def test_build(self):
3232
self.build()
3333
self.assertOutput([executable('program')], '')
34+
35+
36+
@skip_if(env.host_platform.genus != 'darwin', 'frameworks only exist on macOS')
37+
class TestFramework(IntegrationTest):
38+
def __init__(self, *args, **kwargs):
39+
super().__init__('framework', *args, **kwargs)
40+
41+
def test_build(self):
42+
self.build()
43+
self.assertOutput([executable('hello')], 'Hello, world!\n')

0 commit comments

Comments
 (0)