Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/badges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Update badge
run: |
CLI_DOWNLOADS=$(gh api /repos/fossas/fossa-cli/releases --paginate --cache 1h | jq '.[] | .assets | .[] | .download_count' | jq --slurp 'add')
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ jobs:
steps:
- uses: dtolnay/rust-toolchain@stable

- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
lfs: true
fetch-tags: true

- name: Get latest release tag
id: latest-tag
run: echo "tag=$(git describe --tags --abbrev=0 2>/dev/null || echo none)" >> $GITHUB_OUTPUT
run: |
tag="$(git tag --sort=-v:refname 2>/dev/null | head -1 || true)"
echo "tag=${tag:-none}" >> "$GITHUB_OUTPUT"

# Adding the "git config ..." line ensures git doesn't fail during our build.
- name: Configure Git
Expand Down Expand Up @@ -55,15 +57,15 @@ jobs:

# Benchmarks build at a different optimization level, so they use
# their own cache prefix to avoid collisions with the main build.
- uses: actions/cache@v4
- uses: actions/cache@v5
name: Cache cabal store
with:
path: ${{ steps.setup-haskell.outputs.cabal-store || '~/.local/state/cabal' }}
key: ${{ runner.os }}-${{ env.GHC_VERSION }}-benchmarks-cabal-cache-${{ hashFiles('spectrometer.cabal', 'cabal.project.ci.linux', 'cabal.project.common') }}
restore-keys: |
${{ runner.os }}-${{ env.GHC_VERSION }}-benchmarks-cabal-cache-

- uses: actions/cache@v4
- uses: actions/cache@v5
name: Cache dist-newstyle
with:
path: ${{ github.workspace }}/dist-newstyle
Expand Down
32 changes: 24 additions & 8 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,42 +41,58 @@ jobs:
os-name: macOS-intel
project-file: cabal.project.ci.macos
ghc: '9.8.4'
cabal: '3.10.3.0'

- os: windows-latest
os-name: Windows
project-file: cabal.project.ci.windows
ghc: '9.8.4'
cabal: '3.10.3.0'

- os: macos-latest
os-name: macOS-arm64
project-file: cabal.project.ci.macos
ghc: '9.8.4'
cabal: '3.10.3.0'

steps:

- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
lfs: true
fetch-depth: 2
fetch-tags: true

- name: Get latest release tag
id: latest-tag
run: echo "tag=$(git describe --tags --abbrev=0 2>/dev/null || echo none)" >> $GITHUB_OUTPUT
run: |
tag="$(git tag --sort=-v:refname 2>/dev/null | head -1 || true)"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not git describe? It seems tailor made for this: https://git-scm.com/docs/git-describe

echo "tag=${tag:-none}" >> "$GITHUB_OUTPUT"

- name: Install MacOS binary dependencies
if: ${{ contains(matrix.os, 'macos') }}
run: |
brew install jq

# Set up Haskell.
# Cache ghcup installations so the setup action skips downloading GHC (~500 MB).
- uses: actions/cache@v5
if: ${{ !contains(matrix.os-name, 'Linux') }}
name: Cache ghcup
with:
path: |
~/.ghcup/bin
~/.ghcup/ghc/${{ matrix.ghc }}
~/.ghcup/cache
key: ${{ matrix.os-name }}-ghcup-${{ matrix.ghc }}-${{ matrix.cabal }}

- uses: haskell-actions/setup@v2
id: setup-haskell
name: Setup ghc/cabal (non-alpine)
if: ${{ !contains(matrix.os-name, 'Linux') }}
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.10.3.0'
cabal-version: ${{ matrix.cabal }}

# Set up Rust.
# This action installs the 'minimal' profile.
Expand Down Expand Up @@ -129,15 +145,15 @@ jobs:
# The home directory inside a github container run during a step is different than one run outside of it.
# This is why there is special logic for 'LinuxARM'.
# Its builds run inside a container but are cached by an action outside of it.
- uses: actions/cache@v4
- uses: actions/cache@v5
name: Cache cabal store
with:
path: ${{ steps.setup-haskell.outputs.cabal-store || ( matrix.os == 'LinuxARM' && format('{0}/_github_home/.local/state/cabal', runner.temp) || '~/.local/state/cabal') }}
key: ${{ matrix.os-name }}-${{ matrix.ghc }}-cabal-cache-${{ hashFiles('spectrometer.cabal', matrix.project-file, 'cabal.project.common') }}
restore-keys: |
${{ matrix.os-name }}-${{ matrix.ghc }}-cabal-cache-

- uses: actions/cache@v4
- uses: actions/cache@v5
name: Cache dist-newstyle
with:
path: ${{ github.workspace }}/dist-newstyle
Expand Down Expand Up @@ -249,7 +265,7 @@ jobs:
exit 1
fi

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v5
with:
name: ${{ matrix.os-name }}-binaries
path: release
Expand All @@ -263,7 +279,7 @@ jobs:
contents: write

steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5

# Sets VERSION from git's tag or sha.
# refer to: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-of-setting-an-output-parameter
Expand Down Expand Up @@ -438,7 +454,7 @@ jobs:
# need to run for tagged release versions.
- name: Upload release archives
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: release-archives
path: release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install and set GHC and Cabal versions
# The first line works around a ghcup issue:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/install-script-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest-large]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: install script performs installation
shell: bash
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
test-macos-arm:
runs-on: "macos-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: install latest script can install a specific version
shell: bash
run: |
Expand All @@ -80,7 +80,7 @@ jobs:
test-windows:
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: get latest release version from github
shell: pwsh
Expand Down
Loading
Loading