Repository navigation
152 lines (147 loc) · 5.14 KB
/
Copy pathbuild.yml
File metadata and controls
152 lines (147 loc) · 5.14 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# https://github.com/actions/runner-images#available-images
name: Build & Test
on: [push, pull_request]
permissions:
contents: read
jobs:
GCC-CLANG:
name: "${{ matrix.os }}-${{ matrix.altname || matrix.cc }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
max-parallel: 8
matrix:
include:
# x86-64 LP64 with signed plain `char`.
- {os: ubuntu-24.04, cc: gcc, cxx: g++}
- {os: ubuntu-24.04, cc: clang, cxx: clang++}
- {os: ubuntu-22.04, cc: gcc, cxx: g++}
- {os: ubuntu-22.04, cc: clang, cxx: clang++}
# AArch64 LP64 with unsigned plain `char`.
- {os: ubuntu-24.04-arm, cc: gcc, cxx: g++}
# x86 ILP32 with signed plain `char`.
- os: ubuntu-24.04
cc: i686-linux-gnu-gcc
cxx: i686-linux-gnu-g++
altname: "i686-gcc"
# AArch32 ILP32 with unsigned plain `char`, run under qemu. The
# emulation is why this one says so: see build_config/ci/gcc-clang.rb.
- os: ubuntu-24.04
cc: arm-linux-gnueabihf-gcc
cxx: arm-linux-gnueabihf-g++
altname: "armhf-gcc"
emulated: "1"
# AArch64 LP64 with signed plain `char`.
- {os: macos-26, cc: clang, cxx: clang++}
- {os: macos-15, cc: clang, cxx: clang++}
# x86-64 LLP64 with signed plain `char`.
- {os: windows-2025, cc: gcc, cxx: g++, altname: "mingw-gcc"}
- {os: windows-2022, cc: gcc, cxx: g++, altname: "mingw-gcc"}
env:
MRUBY_CONFIG: ci/gcc-clang
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
LD: ${{ matrix.cc }}
MRUBY_CI_EMULATED: ${{ matrix.emulated }}
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
- name: Install i386 cross-build toolchain
if: matrix.altname == 'i686-gcc'
timeout-minutes: 5
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
crossbuild-essential-i386
- name: Install armhf cross-build toolchain
if: matrix.altname == 'armhf-gcc'
timeout-minutes: 5
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
crossbuild-essential-armhf binfmt-support qemu-user-static
echo 'QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf' >> "$GITHUB_ENV"
- name: Ruby version
run: ruby -v
- name: Compiler version
run: ${{ env.CC }} --version
- name: Defines
run: rake defines
- name: Build
run: rake -m test:build
- name: Size
run: rake size
- name: Test
run: rake test:run
Cosmopolitan:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
- name: Ruby version
run: ruby -v
- name: Cache cosmocc
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
id: cache-cosmocc
with:
path: ~/cosmo
key: cosmocc-${{ runner.os }}-20260104
- name: Install cosmocc
if: steps.cache-cosmocc.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cosmo && cd ~/cosmo
wget https://cosmo.zip/pub/cosmocc/cosmocc.zip
unzip cosmocc.zip
- name: Defines
run: |
COSMO_ROOT=~/cosmo rake defines MRUBY_CONFIG=cosmopolitan
- name: Build
run: |
COSMO_ROOT=~/cosmo rake -m test:build MRUBY_CONFIG=cosmopolitan
- name: Size
run: |
COSMO_ROOT=~/cosmo rake size MRUBY_CONFIG=cosmopolitan
- name: Test
run: |
COSMO_ROOT=~/cosmo rake test:run MRUBY_CONFIG=cosmopolitan
Windows-VC:
runs-on: windows-2022
timeout-minutes: 10
env:
MRUBY_CONFIG: ci/msvc
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
submodules: true
- name: Ruby version
run: ruby -v
- name: Defines
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake defines
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake -m test:build
- name: Size
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake size
- name: Test
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
rake test:run