Skip to content

Commit

Permalink
Add gnustep to compile objective-c on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
junjihashimoto committed Sep 24, 2023
1 parent 9f9221e commit 846f43d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
- name: Install packages
run: |
sudo apt-get update -qq
sudo apt-get install -y gobjc++
sudo apt-get install -y gobjc++ libgnustep-base-dev
- uses: actions/cache@v3
with:
path: ~/.stack
key: stack-${{ hashFiles('stack.yaml') }}
- name: Build
run: stack build --stack-yaml stack-nightly.yaml --flag inline-c-cpp:std-vector-example
run: stack build --stack-yaml stack-nightly.yaml --flag inline-c-cpp:std-vector-example --extra-include-dirs /usr/include/GNUstep
- name: Test
run: stack test --stack-yaml stack-nightly.yaml --flag inline-c-cpp:std-vector-example
run: stack test --stack-yaml stack-nightly.yaml --flag inline-c-cpp:std-vector-example --extra-include-dirs /usr/include/GNUstep
stack-lts-21:
name: linux-stack-lts-21
runs-on: ubuntu-latest
Expand All @@ -41,15 +41,15 @@ jobs:
- name: Install packages
run: |
sudo apt-get update -qq
sudo apt-get install -y gobjc++
sudo apt-get install -y gobjc++ libgnustep-base-dev
- uses: actions/cache@v3
with:
path: ~/.stack
key: stack-${{ hashFiles('stack-lts-21.yaml') }}
- name: Build
run: stack build --stack-yaml stack-lts-21.yaml --flag inline-c-cpp:std-vector-example
run: stack build --stack-yaml stack-lts-21.yaml --flag inline-c-cpp:std-vector-example --extra-include-dirs /usr/include/GNUstep
- name: Test
run: stack test --stack-yaml stack-lts-21.yaml --flag inline-c-cpp:std-vector-example
run: stack test --stack-yaml stack-lts-21.yaml --flag inline-c-cpp:std-vector-example --extra-include-dirs /usr/include/GNUstep
stack-lts-20:
name: linux-stack-lts-20
runs-on: ubuntu-latest
Expand All @@ -62,12 +62,12 @@ jobs:
- name: Install packages
run: |
sudo apt-get update -qq
sudo apt-get install -y gobjc++
sudo apt-get install -y gobjc++ libgnustep-base-dev
- uses: actions/cache@v3
with:
path: ~/.stack
key: stack-${{ hashFiles('stack-lts-20.yaml') }}
- name: Build
run: stack build --stack-yaml stack-lts-20.yaml --flag inline-c-cpp:std-vector-example
run: stack build --stack-yaml stack-lts-20.yaml --flag inline-c-cpp:std-vector-example --extra-include-dirs /usr/include/GNUstep
- name: Test
run: stack test --stack-yaml stack-lts-20.yaml --flag inline-c-cpp:std-vector-example
run: stack test --stack-yaml stack-lts-20.yaml --flag inline-c-cpp:std-vector-example --extra-include-dirs /usr/include/GNUstep
2 changes: 2 additions & 0 deletions inline-c-objc/inline-c-objc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ test-suite tests
default-language: Haskell2010
if os(darwin)
frameworks: Foundation
elif os(linux)
extra-libraries: gnustep-base

0 comments on commit 846f43d

Please sign in to comment.