Skip to content

Commit 17643a9

Browse files
authored
Merge pull request #64 from johnnynunez/master
ARM Builds
2 parents 7fd14dd + 8fc7413 commit 17643a9

File tree

3 files changed

+99
-64
lines changed

3 files changed

+99
-64
lines changed

.github/workflows/ci.yml

Lines changed: 92 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,107 @@
1-
name: CI
1+
name: Multi-Arch CI
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: ["master"]
76
pull_request:
8-
branches:
9-
- master
7+
branches: ["master"]
108

119
jobs:
12-
build:
13-
strategy:
14-
matrix:
15-
os: [ubuntu-22.04, macos-12, macos-14, windows-2022]
10+
build:
11+
name: Build (OS=${{ matrix.os }}, Arch=${{ matrix.arch }})
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
os: [ ubuntu-24.04, ubuntu-22.04, macos-15 ]
17+
arch: [ x86_64 ]
18+
include:
19+
- os: ubuntu-24.04-arm
20+
arch: aarch64
21+
- os: ubuntu-22.04-arm
22+
arch: aarch64
23+
- os: macos-15
24+
arch: arm64
25+
- os: windows-2025
26+
arch: amd64
1627

17-
runs-on: ${{ matrix.os }}
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
1831

19-
steps:
20-
- uses: actions/checkout@v4
32+
#####################################
33+
# Dependencies Installation (Optional)
34+
#####################################
2135

22-
- name: Install ninja
23-
shell: bash
24-
run: |
25-
if [[ "${{ runner.os }}" == "macOS" ]]; then
26-
brew install ninja
27-
elif [[ "${{ runner.os }}" == "Linux" ]]; then
28-
sudo apt-get -y update
29-
sudo apt-get -y install ninja-build
30-
fi
36+
# Linux dependencies
37+
- name: Install dependencies (Linux)
38+
if: startsWith(matrix.os, 'ubuntu')
39+
run: |
40+
sudo apt-get update
41+
sudo apt-get install -y build-essential ninja-build cmake git
42+
# If you need system LLVM for something else:
43+
# sudo apt-get install -y clang lld llvm-dev libclang-dev
3144
32-
- name: Build
33-
if: matrix.os != 'windows-2022'
34-
run: |
35-
cmake -Bbuild -S. -GNinja
36-
ninja -Cbuild
45+
# macOS dependencies
46+
- name: Install dependencies (macOS)
47+
if: startsWith(matrix.os, 'macos')
48+
run: |
49+
brew update
50+
brew install ninja cmake git
3751
38-
- name: Build
39-
if: matrix.os == 'windows-2022'
40-
shell: cmd
41-
run: |
42-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
43-
cmake -Bbuild -S. -GNinja
44-
ninja -Cbuild
52+
# Windows dependencies
53+
- name: Install dependencies (Windows)
54+
if: startsWith(matrix.os, 'windows')
55+
shell: pwsh
56+
run: |
57+
choco install ninja cmake git -y
58+
- name: Setup MSBuild (Windows)
59+
if: startsWith(matrix.os, 'windows')
60+
uses: microsoft/setup-msbuild@v2
4561

46-
- name: Test
47-
run: |
48-
cd build/castxml-prefix/src/castxml-build
49-
ctest --output-on-failure
62+
#####################################
63+
# Configure the Superbuild
64+
#####################################
65+
- name: Configure
66+
run: |
67+
cmake -B build -S . -GNinja -DCMAKE_BUILD_TYPE=Release
68+
shell: bash
5069

51-
- name: Create archive for Windows
52-
if: matrix.os == 'windows-2022'
53-
shell: cmd
54-
run: |
55-
cd build
56-
7z a castxml-${{ matrix.os }}.zip castxml
57-
move castxml-${{ matrix.os }}.zip ..
70+
#####################################
71+
# Build the Superbuild
72+
#####################################
73+
- name: Build
74+
run: cmake --build build --config Release
5875

59-
- name: Create archive for macOS and Ubuntu
60-
if: matrix.os != 'windows-2022'
61-
shell: bash
62-
run: |
63-
cd build
64-
tar cvf castxml-${{ matrix.os }}.tar castxml
65-
gzip -9 castxml-${{ matrix.os }}.tar
66-
mv castxml-${{ matrix.os }}.tar.gz ..
76+
#####################################
77+
# [Optional] Run Tests
78+
#####################################
79+
- name: Test
80+
run: |
81+
cd build/castxml-prefix/src/castxml-build
82+
ctest --output-on-failure
6783
68-
- name: Upload artifact
69-
uses: actions/upload-artifact@v4
70-
with:
71-
name: ${{ matrix.os }}-archive
72-
path: ./castxml-${{ matrix.os }}.*
84+
#####################################
85+
# Package the resulting castxml binary
86+
#####################################
87+
- name: Create Artifact (Windows)
88+
if: startsWith(matrix.os, 'windows')
89+
shell: cmd
90+
run: |
91+
cd build\castxml\bin
92+
7z a ..\..\castxml-${{ matrix.os }}-${{ matrix.arch }}.zip castxml.exe
93+
94+
- name: Create Artifact (Non-Windows)
95+
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
96+
shell: bash
97+
run: |
98+
cd build/castxml/bin
99+
tar czvf ../../castxml-${{ matrix.os }}-${{ matrix.arch }}.tar.gz castxml
100+
101+
- name: Upload Artifact
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: castxml-${{ matrix.os }}-${{ matrix.arch }}
105+
path: |
106+
build/castxml-*.tar.gz
107+
build/castxml-*.zip

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME MATCHES "Linux")
123123
set(linux_args "-DCMAKE_CXX_FLAGS:STRING=-static-libstdc++")
124124
endif()
125125
# 2024-04-12 master
126-
set(CastXML_GIT_TAG v0.6.5 CACHE STRING "CastXML Git revision.")
126+
set(CastXML_GIT_TAG v0.6.11 CACHE STRING "CastXML Git revision.")
127127
ExternalProject_Add(castxml
128128
GIT_REPOSITORY https://github.com/CastXML/CastXML.git
129129
GIT_TAG ${CastXML_GIT_TAG}

manylinux-build.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
set -e -x -o pipefail
44

55

6-
dockcross_version=20240404-2c6c0a5
6+
dockcross_version=20250109-7bf589c
77

8-
podman pull docker.io/dockcross/manylinux2014-x64:$dockcross_version
9-
podman run --rm docker.io/dockcross/manylinux2014-x64:$dockcross_version > ./dockcross-x64
8+
podman pull docker.io/dockcross/manylinux_2_28-x64:$dockcross_version
9+
podman run --rm docker.io/dockcross/manylinux_2_28-x64:$dockcross_version > ./dockcross-x64
1010
chmod +x ./dockcross-x64
1111

1212
./dockcross-x64 cmake -Bbuild -S. -GNinja
@@ -19,7 +19,7 @@ popd
1919
rm -rf build
2020

2121

22-
manylinux_version=2024-04-02-96b33b9
22+
manylinux_version=2025.01.24-1
2323

2424
cat << EOF
2525
@@ -32,5 +32,5 @@ once before running the following commands on an amd64 system.
3232
3333
EOF
3434

35-
podman pull quay.io/pypa/manylinux2014_aarch64:$manylinux_version
36-
podman run -it --rm -v $(pwd):/work quay.io/pypa/manylinux2014_aarch64:$manylinux_version /work/manylinux-internal.sh
35+
podman pull quay.io/pypa/manylinux_2_28_aarch64:$manylinux_version
36+
podman run -it --rm -v $(pwd):/work quay.io/pypa/manylinux_2_28_aarch64:$manylinux_version /work/manylinux-internal.sh

0 commit comments

Comments
 (0)