Skip to content
Merged
47 changes: 34 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,48 @@ env:
INTTEST_URL: https://github.com/SacBase/IntegrationTests.git

jobs:
build-ubuntu24:
runs-on: ubuntu-24.04
build-ubuntu26:
runs-on: ubuntu-26.04
container:
image: nvidia/cuda:13.3.1-devel-ubuntu26.04
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install --no-install-recommends -y \
git \
cmake \
python3 \
ninja-build \
ca-certificates \
libhwloc-dev \
uuid-runtime \
uuid-dev \
xsltproc \
bison \
flex \
m4
- name: Get HEAD and submodules
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: 'recursive'
- name: Install dependencies
run: |
sudo apt update
sudo apt install xsltproc -y
- name: Install sac2c
run: |
git clone --single-branch --recursive ${SAC2C_URL} sac2c
cd sac2c
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RELEASE
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=RELEASE -DCUDA=ON
cmake --build build -j4
ln -s $PWD/build/sac2c_p /usr/local/bin/sac2c
sac2c -V
- name: Configure Git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Configure build system
run: |
cmake -S . -B build -G Ninja
cmake -S . -B build -G Ninja \
-DTARGETS="seq;seq_checks;mt_pth;cuda" \
-DBUILD_EXT=ON \
-DLINKSETSIZE=200
- name: Build
shell: bash
run: |
Expand All @@ -54,15 +73,15 @@ jobs:
build-macos-arm:
runs-on: macos-latest
steps:
- name: Install dependencies
run: |
brew update
brew install libxslt
- name: Get HEAD and submodules
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: 'recursive'
- name: Install dependencies
run: |
brew update
brew install libxslt
- name: Set XCode version
uses: maxim-lobanov/setup-xcode@v1
with:
Expand All @@ -77,7 +96,9 @@ jobs:
sac2c -V
- name: Configure build system
run: |
cmake -S . -B build -G Ninja
cmake -S . -B build -G Ninja \
-DTARGETS="seq;seq_checks;mt_pth" \
-DBUILD_EXT=ON
- name: Build
shell: bash
run: |
Expand Down
5 changes: 4 additions & 1 deletion src/structures/String.sac
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ module String;

export all except { indent };

// Using `pragma ctype` leads to issues when compiling for CUDA. CUDA compiles
// generated code as C++, where using `ctype` introduces an implicit cast from
// void* to char*, which is not allowed in C++.
external typedef string;
#pragma ctype "char*"
// #pragma ctype "char*"
#pragma copyfun "copy_string"
#pragma freefun "free_string"
#pragma linkobj "src/String/Str.o"
Expand Down