Skip to content

[Experiment] Enable GitHub Actions #232

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

Merged
merged 20 commits into from
Jun 18, 2021
Merged
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
116 changes: 116 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: CI

on:
pull_request:
push:
branches: [master]
release:
types: [published]


env:
SERVER_ASSET: trypurescript-server
CLIENT_ASSET: trypurescript-client

jobs:
build_server:
name: Build server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: haskell/actions/setup@v1
with:
enable-stack: true
stack-version: "2.5.1"
stack-no-global: true

- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.stack
.stack-work
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml.lock') }}
restore-keys: |
${{ runner.os }}-stack

- name: Build server code
run: |
stack --no-terminal -j1 build

- name: Build server assets
if: github.event_name == 'release'
run: |
mkdir ${{ env.SERVER_ASSET }}
cp $(stack path --dist-dir)/build/trypurescript/trypurescript ${{ env.SERVER_ASSET }}/
cp LICENSE ${{ env.SERVER_ASSET }}/
cp -r deploy/ ${{ env.SERVER_ASSET }}/
cp -r staging/ ${{ env.SERVER_ASSET}}/
tar czf ${{ env.SERVER_ASSET }}.tar.gz -C ${{ env.SERVER_ASSET }}/ .

- name: Persist server assets
uses: actions/upload-artifact@v2
if: github.event_name == 'release'
with:
name: ${{ env.SERVER_ASSET }}.tar.gz
path: ${{ env.SERVER_ASSET }}.tar.gz
retention-days: 1

build_client:
name: Build client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2

- name: Build client code
run: |
cd client
npm install
npm run build
npm run test
npm run build:production

- name: Build client assets
if: github.event_name == 'release'
run: |
mkdir ${{ env.CLIENT_ASSET }}
cp LICENSE ${{ env.CLIENT_ASSET }}/
cp -r client/public/ ${{ env.CLIENT_ASSET }}/
tar czf ${{ env.CLIENT_ASSET }}.tar.gz -C ${{ env.CLIENT_ASSET }}/ .

- name: Persist client assets
uses: actions/upload-artifact@v2
if: github.event_name == 'release'
with:
name: ${{ env.CLIENT_ASSET }}.tar.gz
path: ${{ env.CLIENT_ASSET }}.tar.gz
retention-days: 1

release:
name: Release
runs-on: ubuntu-latest
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
needs:
- build_server
- build_client
steps:
- name: Retrieve server assets
uses: actions/download-artifact@v2
with:
name: ${{ env.SERVER_ASSET }}.tar.gz

- name: Retrieve client assets
uses: actions/download-artifact@v2
with:
name: ${{ env.CLIENT_ASSET }}.tar.gz

- name: Upload server and client assets
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.SERVER_ASSET }}.tar.gz
${{ env.CLIENT_ASSET }}.tar.gz
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

94 changes: 36 additions & 58 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,81 +11,63 @@ New features:
Bugfixes:

Other improvements:
- Stop mangled 'Compiled ModuleName' output (#228 by @JordanMartinez)
- Update dev instructions: create valid symbolic link across OSes (#226 by @JordanMartinez)

- Migrated CI to GitHub Actions (#232 by @thomashoneyman)
- Fixed mangled 'Compiled ModuleName' output (#228 by @JordanMartinez)
- Updated dev instructions: create valid symbolic link across OSes (#226 by @JordanMartinez)
- Added a changelog (#229 by @JordanMartinez)
- Update PureScript dependency to v0.14.2 (#230 by @JordanMartinez)
- Speed up server slightly by using `rebuildModule'` (#230 by @JordanMartinez)
- Updated PureScript dependency to v0.14.2 (#230 by @JordanMartinez)
- Sped up server slightly by using `rebuildModule'` (#230 by @JordanMartinez)

## [v2021-05-29.1](https://github.com/purescript/trypurescript/releases/tag/v2021-05-29.1) - 2021-05-29

This release officially adds support for PureScript 0.14 to Try PureScript, among many other (largely internal) improvements and updates.

* Updated the compiler and package set for PureScript 0.14 (#209, #213, #224 by @thomashoneyman, #223 by @JordanMartinez)
* Updated local development instructions (#221 by @JordanMartinez, #225 by @thomashoneyman)
* Added support for loading files from GitHub repositories and migrated examples into the Try PureScript repository (#218 by @thomashoneyman)
* Migrated the client to Halogen from JQuery (#215 by @thomashoneyman)
* Migrated the client to `argonaut-codecs` from `foreign-generic` (#212, #217 by @thomashoneyman)
* Migrated the client to `Aff` from `ContT` (#208 by @thomashoneyman)
* Added fixtures to test API responses (#211 by @thomashoneyman)
* Removed unused pragmas, imports, and definitions from server code (#206 by @thomashoneyman)
* Allowed form submission in the Try PureScript iframe (#203 by @mikesol)
* Switch to use a svg favicon with ico fallback (#191 by @milesfrain)
* Implement `encode` in PureScript instead of in FFI (#186 by @maxdeviant)
- Updated the compiler and package set for PureScript 0.14 (#209, #213, #224 by @thomashoneyman, #223 by @JordanMartinez)
- Updated local development instructions (#221 by @JordanMartinez, #225 by @thomashoneyman)
- Added support for loading files from GitHub repositories and migrated examples into the Try PureScript repository (#218 by @thomashoneyman)
- Migrated the client to Halogen from JQuery (#215 by @thomashoneyman)
- Migrated the client to `argonaut-codecs` from `foreign-generic` (#212, #217 by @thomashoneyman)
- Migrated the client to `Aff` from `ContT` (#208 by @thomashoneyman)
- Added fixtures to test API responses (#211 by @thomashoneyman)
- Removed unused pragmas, imports, and definitions from server code (#206 by @thomashoneyman)
- Allowed form submission in the Try PureScript iframe (#203 by @mikesol)
- Switch to use a svg favicon with ico fallback (#191 by @milesfrain)
- Implement `encode` in PureScript instead of in FFI (#186 by @maxdeviant)

## [v2020-07-11.1](https://github.com/purescript/trypurescript/releases/tag/v2020-07-11.1) - 2020-07-11

* Enable automated SSL certificate renewal (#184, @hdgarrood)
* Remove unused `parsec` dependency (#178, @hdgarrood)
* Only listen on 127.0.0.1 (#177, @hdgarrood)
- Enable automated SSL certificate renewal (#184, @hdgarrood)
- Remove unused `parsec` dependency (#178, @hdgarrood)
- Only listen on 127.0.0.1 (#177, @hdgarrood)

## [v2020-05-26.1](https://github.com/purescript/trypurescript/releases/tag/v2020-05-26.1) - 2020-05-26

* Update to PureScript v0.13.8 (#175, @hdgarrood
* Make the whole package set available (#173, @hdgarrood, @thomashoneyman)
* Do away with version numbers (#176, @hdgarrood)
- Update to PureScript v0.13.8 (#175, @hdgarrood
- Make the whole package set available (#173, @hdgarrood, @thomashoneyman)
- Do away with version numbers (#176, @hdgarrood)

## [v0.13.7](https://github.com/purescript/trypurescript/releases/tag/v0.13.7) - 2020-05-03

* Fix help link (#165, @hdgarrood)
* Update API documentation in readme (#168, @hdgarrood)
- Fixed help link (#165, @hdgarrood)
- Update API documentation in readme (#168, @hdgarrood)

## [v0.13.6](https://github.com/purescript/trypurescript/releases/tag/v0.13.6) - 2020-05-03

* Update to v0.13.6 of the PureScript compiler
* minor tweaks to get deploys working
- Updated to v0.13.6 of the PureScript compiler
- Made minor tweaks to get deploys working

## [v0.13.5](https://github.com/purescript/trypurescript/releases/tag/v0.13.5) - 2020-05-02

* Update to v0.13.5 of the compiler (@natefaubion)
* Remove backends, serve individual modules on demand (@natefaubion, @gabejohnson, #128, #136)
* Host the client ourselves rather than using GH pages
* Put all source files in one branch (@gabejohnson, #135)
* Fix gist navigation within the iframe (@natefaubion, #140)
* Use different sourceURL syntax per warnings (@natefaubion, #141)
* Switch to spago for managing PS dependencies (@hdgarrood, #147, #150)
* Build the frontend in CI (@hdgarrood, #152)
* Mostly automated deployments (@hdgarrood)

## [v0.12.0-rc.5](https://github.com/purescript/trypurescript/releases/tag/v0.12.0-rc.5) - 2020-05-02

Testing deployment

## [v0.12.0-rc.4](https://github.com/purescript/trypurescript/releases/tag/v0.12.0-rc.4) - 2020-05-02

Testing deployment

## [v0.12.0-rc.3](https://github.com/purescript/trypurescript/releases/tag/v0.12.0-rc.3) - 2020-05-02

Testing deployment

## [v0.12.0-rc.2](https://github.com/purescript/trypurescript/releases/tag/v0.12.0-rc.2) - 2020-05-02

Testing deployment

## [v0.12.0-rc.1](https://github.com/purescript/trypurescript/releases/tag/v0.12.0-rc.1) - 2020-05-02

Mostly for testing the new deployment mechanisms.
- Updated to v0.13.5 of the compiler (@natefaubion)
- Removed backends, now serve individual modules on demand (@natefaubion, @gabejohnson, #128, #136)
- Hosted the client ourselves rather than using GH pages
- Put all source files in one branch (@gabejohnson, #135)
- Fixed gist navigation within the iframe (@natefaubion, #140)
- Used different sourceURL syntax per warnings (@natefaubion, #141)
- Switched to spago for managing PS dependencies (@hdgarrood, #147, #150)
- Built the frontend in CI (@hdgarrood, #152)
- Mostly automated deployments (@hdgarrood)

## [v0.11.7](https://github.com/purescript/trypurescript/releases/tag/v0.11.7) - 2017-11-30

Expand Down Expand Up @@ -125,12 +107,8 @@ New version using compiler v0.10.2

## [v0.9.1.1](https://github.com/purescript/trypurescript/releases/tag/v0.9.1.1) - 2016-06-17



## [v0.9.1](https://github.com/purescript/trypurescript/releases/tag/v0.9.1) - 2016-06-17



## [v0.8.2.0](https://github.com/purescript/trypurescript/releases/tag/v0.8.2.0) - 2016-03-11

Updates for v0.8.2 compiler
24 changes: 0 additions & 24 deletions ci/before_deploy.sh

This file was deleted.

22 changes: 0 additions & 22 deletions ci/build.sh

This file was deleted.

10 changes: 0 additions & 10 deletions client/.travis.yml

This file was deleted.