-
-
Notifications
You must be signed in to change notification settings - Fork 688
119 lines (107 loc) · 3.44 KB
/
ci-pr.yml
File metadata and controls
119 lines (107 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: CI Pull Request
on: [pull_request]
permissions:
contents: read
jobs:
buildtest-linux-x86:
container:
image: racket/racket-ci:latest
options: --init
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Build
run: make CPUS="$(nproc)" PKGS=""
- name: Extend PATH with Racket executable
run: echo "${GITHUB_WORKSPACE}/racket/bin" >> $GITHUB_PATH
- name: Test
run: bash .github/scripts/run-racket-tests.sh
buildtest-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v6
- name: Build
run: make CPUS="$(sysctl -n hw.physicalcpu)" PKGS=""
- name: Extend PATH with Racket executable
run: echo "${GITHUB_WORKSPACE}/racket/bin" >> $GITHUB_PATH
- name: Test
run: bash .github/scripts/run-racket-tests.sh
- name: Tarball
run: tar -cvjf racketcs-macos-aarch64_git${{ github.sha }}.tar.bz2 racket
- uses: actions/upload-artifact@v7
with:
name: racketcs-macos-aarch64_git${{ github.sha }}
path: racketcs-macos-aarch64_git${{ github.sha }}.tar.bz2
build-ios:
runs-on: macos-14
needs: buildtest-macos
steps:
- uses: actions/checkout@v6
- uses: actions/download-artifact@v8
with:
name: racketcs-macos-aarch64_git${{ github.sha }}
path: ${{ github.workspace }}
- name: Untar host Racket
run: |
mkdir host-racket
tar -xvjf racketcs-macos-aarch64_git${{ github.sha }}.tar.bz2 -C host-racket --strip-components 1
- name: Build iOS Racket
run: |
set -euxo pipefail
mkdir -p racket/src/build-ios
pushd racket/src/build-ios
../configure \
--host=aarch64-apple-darwin \
--enable-ios=iPhoneOS \
--enable-racket=${{ github.workspace }}/host-racket/bin/racket \
--enable-scheme=${{ github.workspace }}/host-racket/src/build/cs/c
make
make install
build-pb-ios:
runs-on: macos-14
steps:
- uses: actions/checkout@v6
- name: Build LibFFI
run: |
set -euxo pipefail
brew install automake libtool
git clone https://github.com/libffi/libffi
cd libffi
git checkout v3.4.6
./autogen.sh
python generate-darwin-source-and-headers.py --only-ios
xcodebuild \
-configuration release \
-target libffi-iOS \
-scheme libffi-iOS \
-sdk "$(xcode-select -p)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" \
-derivedDataPath dist \
IPHONEOS_DEPLOYMENT_TARGET=12
- name: Build PB iOS Racket
run: |
set -euxo pipefail
make fetch-pb
mkdir -p racket/src/build
cd racket/src/build
cat >libffi.pc <<EOF
prefix=${GITHUB_WORKSPACE}/libffi/dist/Build/Products/Release-iphoneos
exec_prefix=\${prefix}
libdir=\${exec_prefix}
toolexeclibdir=\${libdir}
includedir=\${prefix}/include/ffi
Name: libffi
Description: Library supporting Foreign Function Interfaces
Version: 3.4.6
Libs: -L\${toolexeclibdir} -lffi
Cflags: -I\${includedir}
EOF
cat libffi.pc
env PKG_CONFIG_PATH="$(pwd)" \
../configure \
--host=aarch64-apple-darwin \
--enable-ios=iPhoneOS \
--enable-pb \
--enable-racket=auto \
--enable-libffi
make
make install