Skip to content

Commit

Permalink
Set up new CI
Browse files Browse the repository at this point in the history
  • Loading branch information
nwolverson committed Dec 4, 2020
1 parent 78a16e6 commit 2b34cb8
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 18 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: build

on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12
- uses: actions/cache@v2
with:
path: |
output
key: ${{ runner.os }}-build-products
- run: nix-shell --run 'make ci'
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release

on:
push:
tags:
- 'erl-*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v12
- name: Render packages.dhall
run: |
nix-shell --run '>packages.dhall dhall <<< ./src/packages.dhall'
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./packages.dhall
asset_name: packages.dhall
asset_content_type: application/x-dhall
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ all: format generate validate dhall
ci: generate
echo "Checking if packages.json has changed..."
git diff --exit-code packages.json
cd src && spago verify-set
# TODO spago verify & backend
# cd src && spago verify-set

format:
@nix-shell --run 'find src/ -iname "*.dhall" -exec dhall format --inplace {} \;'
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let
purerlSupport =
builtins.fetchGit {
name = "purerl-support-packages";
url = "git@github.com:id3as/nixpkgs-purerl-support.git";
url = "https://github.com/id3as/nixpkgs-purerl-support.git";
rev = "47a8bd6ff017dad2208f10dddf91f6f3258a09be";
};

Expand Down

0 comments on commit 2b34cb8

Please sign in to comment.