Skip to content

Commit

Permalink
Add macos in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
junjihashimoto committed Sep 24, 2023
1 parent dd69574 commit e596d23
Showing 1 changed file with 27 additions and 63 deletions.
90 changes: 27 additions & 63 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,66 +8,30 @@ on:
- opened
- synchronize
jobs:
stack-nightly:
name: linux-stack-nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Install packages
run: |
sudo apt-get update -qq
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
- name: Test
run: stack test --stack-yaml stack-nightly.yaml --flag inline-c-cpp:std-vector-example
stack-lts-21:
name: linux-stack-lts-21
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Install packages
run: |
sudo apt-get update -qq
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
- name: Test
run: stack test --stack-yaml stack-lts-21.yaml --flag inline-c-cpp:std-vector-example
stack-lts-20:
name: linux-stack-lts-20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Install packages
run: |
sudo apt-get update -qq
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
- name: Test
run: stack test --stack-yaml stack-lts-20.yaml --flag inline-c-cpp:std-vector-example
build:
name: ${{ matrix.os }}-stack-${{ matrix.stackage }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
stackage: ['nightly', 'lts-21', 'lts-20']
steps:
- uses: actions/checkout@v4
- uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Install packages
run: |
if [ ${{ matrix.os }} == "ubuntu-latest" ] ; then
sudo apt-get update -qq && sudo apt-get install -y gobjc++ libgnustep-base-dev
fi
- uses: actions/cache@v3
with:
path: ~/.stack
key: stack-${{ matrix.os }}-${{ matrix.stackage }}-${{ hashFiles('stack.yaml') }}
- name: Build
run: stack build --stack-yaml stack-${{ matrix.stackage }}.yaml --flag inline-c-cpp:std-vector-example
- name: Test
run: stack test --stack-yaml stack-${{ matrix.stackage }}.yaml --flag inline-c-cpp:std-vector-example

0 comments on commit e596d23

Please sign in to comment.