Skip to content

Use blocks runtime from libdispatch #272

Use blocks runtime from libdispatch

Use blocks runtime from libdispatch #272

Workflow file for this run

name: Build packages
on:
push:
branches:
- main
pull_request:
jobs:
windows:
runs-on: windows-2025
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Remove conflicting copies of make
# The runners include a copy of mingw64, and explicitly add mingw64's copy of make.exe to PATH. This
# will cause the build to fail. Remove mingw64 alltogether.
# See https://github.com/actions/runner-images/blob/main/images/windows/scripts/build/Install-Mingw64.ps1#L63-L67
# The same goes for C:\Strawberry\*\bin, which contains copy of make, pkg-config, and gdb
shell: cmd
run: |
rmdir /q /s C:\mingw64\bin\
rmdir /q /s C:\Strawberry\c\bin\
rmdir /q /s C:\Strawberry\perl\bin\
- name: Check LLVM version
# We need at least LLVM 18.0 for proper Objective C support. Visual Studio 2022 ships with LLVM 17,
# so we need to make sure we pick up clang from C:\Program Files\LLVM\bin\
# For full-fledged support on Windows, we'll need https://github.com/llvm/llvm-project/pull/107604,
# which will is included in LLVM 20.0. The windows-2025 GitHub Actions image has this version of clang;
# trust but verify
run: |
clang --version
- name: Install Conan
run: |
pip install conan==2.18.1
pip install pygit2
conan --version
conan config install global.conf
- name: Mark path as safe
run: git config --global --add safe.directory $(pwd)
- name: Check out main branch
run: |
git branch $env:GITHUB_BASE_REF origin/$env:GITHUB_BASE_REF
git show-ref
if: ${{ github.ref != 'refs/heads/main' }}
- name: Install gnustep-helpers
run: conan create gnustep-helpers --profile:a=${{ github.workspace }}/profiles/windows-clang
- name: Install libdispatch
run: conan create libdispatch --profile:a=${{ github.workspace }}/profiles/windows-clang
- name: Install libobjc2
run: conan create libobjc2 --profile:a=${{ github.workspace }}/profiles/windows-clang
- name: Install gnustep-make
run: conan create gnustep-make --profile:a=${{ github.workspace }}/profiles/windows-clang
- name: Install gnustep-base
run: conan create gnustep-base --profile:a=${{ github.workspace }}/profiles/windows-clang -c tools.build:skip_test=True
- name: Install gnustep-gui
run: conan create gnustep-gui --profile:a=${{ github.workspace }}/profiles/windows-clang
- name: Install gnustep-headless
run: conan create gnustep-headless --profile:a=${{ github.workspace }}/profiles/windows-clang
- name: Build tutorial
run: |
conan install conanfile.txt --profile:a=../profiles/windows-clang --output-folder=build/ --conf="tools.env.virtualenv:powershell=pwsh.exe"
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -GNinja
cmake --build build
./build/conanrun.ps1
./build/Tutorial.exe
working-directory: tutorial/
- name: Upload Conan packages to Cloudsmith
run: |
conan remote add cloudsmith https://conan.cloudsmith.io/qmfrederik/gnustep/
conan remote login -p ${{ secrets.CLOUDSMITH_API_KEY }} cloudsmith ${{ secrets.CLOUDSMITH_USER }}
conan upload libobjc2/* --confirm -r cloudsmith
conan upload libdispatch/* --confirm -r cloudsmith
conan upload gnustep-*/* --confirm -r cloudsmith
if: ${{ github.ref == 'refs/heads/main' }}
- name: Upload Conan cache to GitHub artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: conan-gnustep-windows
path: |
~/.conan2/p
!~/.conan2/p/msys2*
linux:
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- name: ubuntu-22.04
image: ubuntu:22.04
family: ubuntu
- name: ubuntu-24.04
image: ubuntu:24.04
family: ubuntu
- name: rockylinux-10
image: rockylinux/rockylinux:10
family: rhel
# Some packages, such as giflib-devel, are not in the base RHEL repos but in an additional repository;
# which was named 'powertools' on RHEL8 and 'CodeReady Builder' on RHEL9.
# See https://wiki.rockylinux.org/rocky/repo/#notes-on-crb
repos: crb
- name: rockylinux-9
image: rockylinux:9
family: rhel
repos: crb
- name: rockylinux-8
image: rockylinux:8
family: rhel
repos: powertools
steps:
- name: Install dependencies (Ubuntu)
run: |
apt-get update
apt-get install -y clang lld curl zip unzip tar git pkg-config make python3-venv cmake
if: matrix.family == 'ubuntu'
- name: Install dependencies (Enterprise Linux)
run: |
yum install -y clang lld zip unzip tar git pkg-config which findutils python312 cmake
if: matrix.family == 'rhel'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install conan
run: |
python3 -m venv .python3/
.python3/bin/pip install conan==2.18.1
.python3/bin/pip install pygit2
.python3/bin/conan --version
.python3/bin/conan config install global.conf
- name: Mark path as safe
run: git config --global --add safe.directory $(pwd)
- name: Check out main branch
run: |
git branch $GITHUB_BASE_REF origin/$GITHUB_BASE_REF
git show-ref
if: ${{ github.ref != 'refs/heads/main' }}
- name: Install gnustep-helpers
run: .python3/bin/conan create gnustep-helpers --profile:a=profiles/linux-clang
- name: Install libdispatch
run: .python3/bin/conan create libdispatch --profile:a=profiles/linux-clang
- name: Install libobjc2
run: .python3/bin/conan create libobjc2 --profile:a=profiles/linux-clang
- name: Install gnustep-make
run: .python3/bin/conan create gnustep-make --profile:a=profiles/linux-clang
- name: Install gnustep-base dependencies (Ubuntu)
run: |
apt-get update
apt-get install -y libffi-dev libxml2-dev libxslt-dev gnutls-dev libicu-dev libcurl4-gnutls-dev
if: matrix.family == 'ubuntu'
- name: Install gnustep-base dependencies (Enterprise Linux)
run: |
yum install -y libffi-devel libxml2-devel libxslt-devel gnutls-devel libicu-devel libcurl-devel
if: matrix.family == 'rhel'
- name: Install gnustep-base
run: .python3/bin/conan create gnustep-base --profile:a=profiles/linux-clang -c tools.build:skip_test=True
- name: Install gnustep-gui dependencies (Ubuntu)
run: |
apt-get update
apt-get install -y libtiff-dev libpng-dev libjpeg-dev libgif-dev
if: matrix.family == 'ubuntu'
- name: Install gnustep-gui dependencies (Enterprise Linux)
run: |
yum install --enablerepo=${{ matrix.repos}} -y libtiff-devel libpng-devel libjpeg-devel giflib-devel
if: matrix.family == 'rhel'
- name: Install gnustep-gui
run: .python3/bin/conan create gnustep-gui --profile:a=profiles/linux-clang
- name: Install gnustep-headless dependencies (Ubuntu)
run: apt-get install -y libfreetype-dev
if: matrix.family == 'ubuntu'
- name: Install gnustep-headless dependencies (Enterprise Linux)
run: yum install --enablerepo=${{ matrix.repos}} -y freetype-devel
if: matrix.family == 'rhel'
- name: Install gnustep-headless
run: .python3/bin/conan create gnustep-headless --profile:a=profiles/linux-clang
- name: Build tutorial
run: |
../.python3/bin/conan install conanfile.txt --profile:a=../profiles/linux-clang --output-folder=build/
CC=clang CXX=clang++ LDFLAGS="-fuse-ld=lld" cmake -S. -B build/ -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build build
. build/conanrun.sh
./build/Tutorial
working-directory: tutorial/
- uses: actions/upload-artifact@v4
if: always()
with:
name: conan-gnustep-${{ matrix.name }}
path: |
~/.conan2/p
./tutorial/
linux-gcc:
runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}
strategy:
fail-fast: false
matrix:
include:
- name: ubuntu-22.04
image: ubuntu:22.04
family: ubuntu
steps:
- name: Install dependencies (Ubuntu)
run: |
apt-get update
apt-get install -y gobjc-11 libstdc++-11-dev curl zip unzip tar git pkg-config make python3-venv cmake
if: matrix.family == 'ubuntu'
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install conan
run: |
python3 -m venv .python3/
.python3/bin/pip install conan==2.18.1
.python3/bin/pip install pygit2
.python3/bin/conan --version
.python3/bin/conan config install global.conf
- name: Mark path as safe
run: git config --global --add safe.directory $(pwd)
- name: Check out main branch
run: |
git branch $GITHUB_BASE_REF origin/$GITHUB_BASE_REF
git show-ref
if: ${{ github.ref != 'refs/heads/main' }}
- name: Install gnustep-helpers
run: .python3/bin/conan create gnustep-helpers --profile:a=profiles/linux-gcc
- name: Install gnustep-make
run: .python3/bin/conan create gnustep-make --profile:a=profiles/linux-gcc
- name: Install gnustep-base
run: .python3/bin/conan create gnustep-base --profile:a=profiles/linux-gcc -c tools.build:skip_test=True
- name: Install gnustep-gui
run: .python3/bin/conan create gnustep-gui --profile:a=profiles/linux-gcc