From dc6e564ea2d6ee0d4f9937f288759459264c4b26 Mon Sep 17 00:00:00 2001 From: Sunshine Date: Sat, 4 Apr 2020 19:05:49 -0400 Subject: [PATCH] integrate GitHub Actions CI further --- .github/workflows/build.yml | 24 ++++++++++++++++++++++++ .github/workflows/ci.yml | 2 -- .travis.yml | 4 ++-- Makefile | 18 +++++++++++------- README.md | 11 ++++++----- 5 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f72f103 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,24 @@ +name: Build + +on: + push: + branches: [ master ] + +jobs: + build: + + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + rust: + - stable + runs-on: ${{ matrix.os }} + + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - name: Build + run: cargo build --all --locked --verbose diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5938125..3e66d1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,6 @@ name: CI on: - push: - branches: [ master ] pull_request: branches: [ master ] diff --git a/.travis.yml b/.travis.yml index 7c0fd84..025a718 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,8 @@ os: rust: - stable -- beta -- nightly +# - beta +# - nightly git: autocrlf: false # don't mangle LF into CRLF on windows diff --git a/Makefile b/Makefile index 3117e09..f6cd4de 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,25 @@ -#!/usr/bin/make -f +# Makefile for monolith -all: test +all: build .PHONY: all build: @cargo build --locked .PHONY: build -install: - @cargo install --force --locked --path . -.PHONY: install - test: build @cargo test --locked @cargo fmt --all -- --check -.PHONY: test +.PHONY: test_code_formatting lint: @cargo fmt --all -- .PHONY: lint + +install: + @cargo install --force --locked --path . +.PHONY: install + +uninstall: + @cargo uninstall +.PHONY: uninstall diff --git a/README.md b/README.md index b9d5be2..ef708cf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +[![GitHub Actions Build Status](https://github.com/Y2Z/monolith/workflows/Build/badge.svg)](https://github.com/Y2Z/monolith/actions?query=workflow%3ABuild) [![Travis CI Build Status](https://travis-ci.org/Y2Z/monolith.svg?branch=master)](https://travis-ci.org/Y2Z/monolith) [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/ae7soyjih8jg2bv7/branch/master?svg=true)](https://ci.appveyor.com/project/snshn/monolith/branch/master) @@ -21,11 +22,6 @@ If compared to saving websites with `wget -mpk`, this tool embeds all assets as ## Installation -#### From source - $ git clone https://github.com/Y2Z/monolith.git - $ cd monolith - $ make install - #### With Homebrew (on macOS and GNU/Linux) $ brew install monolith @@ -35,6 +31,11 @@ If compared to saving websites with `wget -mpk`, this tool embeds all assets as #### Via Docker The guide can be found [here](docs/containers.md) +#### From source + $ git clone https://github.com/Y2Z/monolith.git + $ cd monolith + $ make install + --------------------------------------------------- ## Usage