Skip to content

Commit

Permalink
Merge pull request #21 from msakai/update-github-actions-202405
Browse files Browse the repository at this point in the history
Update GitHub Actions (2024-05)
  • Loading branch information
msakai authored May 23, 2024
2 parents 2bd01fd + d6dceeb commit c1f5b1e
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

name: build
jobs:
build:
Expand Down Expand Up @@ -44,17 +49,20 @@ jobs:
stack_yaml: 'stack-ghc-9.4.yaml'
flags: ''
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: haskell/actions/setup@v2
- uses: haskell-actions/setup@v2
id: setup-haskell
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 'latest'

- uses: actions/cache@v3
- name: Setup stack
run: stack config set system-ghc --global true

- uses: actions/cache@v4
name: Cache ~/.stack
with:
path: ${{ steps.setup-haskell.outputs.stack-root }}
Expand All @@ -67,6 +75,10 @@ jobs:
- name: Install packages (macOS)
if: runner.os == 'macOS'
run: brew install msakai/tap/liblbfgsb
- name: Add /opt/homebrew/lib as extra library directory
if: runner.os == 'macOS' && runner.arch == 'ARM64'
run: |
echo "extra-lib-dirs: [/opt/homebrew/lib]" >> ${{ matrix.stack_yaml }}
- name: Install packages (Windows)
if: runner.os == 'Windows'
Expand All @@ -78,6 +90,10 @@ jobs:
stack --stack-yaml ${{ matrix.stack_yaml }} exec -- pacman -S --needed --noconfirm ${MINGW_PACKAGE_PREFIX}-lapack
stack --stack-yaml ${{ matrix.stack_yaml }} exec -- pacman -U --noconfirm ${MINGW_PACKAGE_PREFIX}-liblbfgsb-3.0-1-any.pkg.tar.zst
- name: Build dependencies
run: |
stack --stack-yaml ${{ matrix.stack_yaml }} build --test --no-run-tests --bench --no-run-benchmarks --only-dependencies --flag nonlinear-optimization-ad:BuildSamplePrograms --flag nonlinear-optimization-backprop:BuildSamplePrograms ${{ matrix.flags }}
- name: Build
run: |
stack --stack-yaml ${{ matrix.stack_yaml }} build --test --no-run-tests --bench --no-run-benchmarks --flag nonlinear-optimization-ad:BuildSamplePrograms --flag nonlinear-optimization-backprop:BuildSamplePrograms ${{ matrix.flags }}
Expand Down

0 comments on commit c1f5b1e

Please sign in to comment.