Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating/cleaning up our github actions #614

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
59 changes: 0 additions & 59 deletions .github/workflows/artifacts-native.yaml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/workflows/artifacts-nix.yaml

This file was deleted.

62 changes: 38 additions & 24 deletions .github/workflows/ci-native.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🧪 Tests (Native)
name: 🧪 Test and 🏗️ Build (Native)

# Trigger the workflow on push or pull request, but only for the main branch
on:
Expand All @@ -8,36 +8,50 @@ on:

jobs:
stack:
name: 🖥️ ${{ matrix.os }} 🏭 GHC ${{ matrix.ghc }} 📚 Stack ${{ matrix.stack }}
name: 🖥️ ${{ matrix.os }} 📚 Stack ${{ matrix.stack }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
stack:
- "2.5.1"
ghc:
- "8.10.4"
- "2.7.5"
os:
- macos-10.15
- macos-11
- ubuntu-18.04
- ubuntu-20.04

steps:
- uses: actions/checkout@v2
name: 📤 Checkout
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'

- uses: haskell/actions/setup@v1
name: 🧱 Set up Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: ${{ matrix.stack }}

- uses: actions/cache@v2
name: 🗄️ Cache ~/.stack
with:
path: ~/.stack
key: ${{ matrix.os }}-${{ matrix.ghc }}-stack-ci-2

- name: 🧪 Test
run: |
stack test --no-nix
- uses: actions/checkout@v3
name: 📤 Checkout

- uses: haskell/actions/setup@v2
name: 🧱 Set up Haskell Stack
with:
enable-stack: true
stack-version: ${{ matrix.stack }}

- uses: actions/cache@v3
name: 🗄️ Cache ~/.stack
with:
path: ~/.stack
key: ${{ matrix.os }}-stack-${{ hashFiles('stack.yaml.lock') }}

- name: 🧪 Test
run: |
stack test

- name: 🏗️ Build
run: |
stack build

- name: 🏺 Upload CLI Artifact
uses: actions/upload-artifact@v2
with:
name: fission-cli-${{ matrix.os }}
path: ./.stack-work/**/bin/fission

- name: 🏺 Upload Server Artifact
uses: actions/upload-artifact@v2
with:
name: fission-server-${{ matrix.os }}
path: ./.stack-work/**/bin/fission-server
27 changes: 21 additions & 6 deletions .github/workflows/ci-nix.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🧪 Tests (Nix)
name: 🧪 Test and 🏗️ Build (Nix)

# Trigger the workflow on push or pull request, but only for the main branch
on:
Expand All @@ -17,16 +17,15 @@ jobs:
- ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
name: 📤 Checkout
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'

- uses: cachix/install-nix-action@v16
- uses: cachix/install-nix-action@v17
name: ❄️ Set up Nix
with:
nix_path: nixpkgs=channel:nixos-unstable
nix_path: nixpkgs=channel:nixos-22.05

- uses: actions/cache@v2
- uses: actions/cache@v3
name: 🗄️ Cache ~/.stack
with:
path: ~/.stack
Expand All @@ -35,3 +34,19 @@ jobs:
- name: 🧪 Test
run: |
nix-shell --command quality

- name: 🏗️ Build
run: |
nix-shell --command build

- name: 🏺 Upload CLI Artifact
uses: actions/upload-artifact@v2
with:
name: fission-cli-${{ matrix.os }}-nix
path: ./.stack-work/**/*-nix/**/bin/fission

- name: 🏺 Upload Server Artifact
uses: actions/upload-artifact@v2
with:
name: fission-server-${{ matrix.os }}-nix
path: ./.stack-work/**/*-nix/**/bin/fission-server