Skip to content

0.7.2.0

0.7.2.0 #20

Workflow file for this run

name: Build binaries
on:
release:
types: [published]
defaults:
run:
shell: bash
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
targetOs: Linux
- os: macOS-latest
targetOs: macOS
- os: ubuntu-latest
targetOs: Windows
name: Build binary for ${{ matrix.targetOs }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
accept-flake-config = true
- name: Build binary
run: nix build -L .#binaries/${{ matrix.targetOS }}
- name: Prepare upload
run: |
cd result/bin
7z a -l ${{ github.workspace }}/ormolu.zip .
- uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ormolu.zip
asset_name: ormolu-${{ matrix.targetOs }}.zip
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
name: Test built binaries
runs-on: ${{ matrix.os }}
needs: build
steps:
- name: Download and extract binary
run: |
curl -sL https://github.com/${{ github.repository }}/releases/download/${{ github.event.release.tag_name }}/ormolu-${{ runner.os }}.zip > ormolu.zip
7z e ormolu.zip
- name: Basic functionality tests
run: |
./ormolu --version
echo "data A = A" > test.hs
./ormolu -m check test.hs