From 846f43dd907b0a48eaf43e187787222e6721b71b Mon Sep 17 00:00:00 2001 From: Junji Hashimoto Date: Sun, 24 Sep 2023 20:39:36 +0900 Subject: [PATCH] Add gnustep to compile objective-c on linux --- .github/workflows/ci.yaml | 18 +++++++++--------- inline-c-objc/inline-c-objc.cabal | 2 ++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fe36c71..50910c2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 @@ -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 @@ -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 diff --git a/inline-c-objc/inline-c-objc.cabal b/inline-c-objc/inline-c-objc.cabal index 76b98d1..029c203 100644 --- a/inline-c-objc/inline-c-objc.cabal +++ b/inline-c-objc/inline-c-objc.cabal @@ -38,3 +38,5 @@ test-suite tests default-language: Haskell2010 if os(darwin) frameworks: Foundation + elif os(linux) + extra-libraries: gnustep-base