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

upgrade some ci actions #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
25 changes: 15 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ jobs:
build-platform:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I find this one handy so it doesn't stop as soon as it fails on one of the OS. I did the same for the test step below

matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
# Steps needed for esy
- uses: actions/setup-node@v1
with:
node-version: 12
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Install esy
run: npm install -g esy

# Install and build
- name: Try to restore install cache
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ~/.esy/source
key: source-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
Expand All @@ -35,7 +36,7 @@ jobs:
run: node .github/workflows/print_esy_cache.js
- name: Try to restore dependencies cache
id: deps-cache
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
key: build-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
Expand All @@ -59,24 +60,27 @@ jobs:
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 1
ref: ${{ github.ref }}
submodules: true
# Download platform artifacts
- name: Download Linux release
uses: actions/download-artifact@v1
uses: actions/download-artifact@v2
with:
name: ubuntu-latest
path: ubuntu-latest
- name: Download Windows release
uses: actions/download-artifact@v1
uses: actions/download-artifact@v2
with:
name: windows-latest
path: windows-latest
- name: Download macOS release
uses: actions/download-artifact@v1
uses: actions/download-artifact@v2
with:
name: macOS-latest
path: macOS-latest
# Move artifacts in place
- name: Move artifacts
run: |
Expand Down Expand Up @@ -112,17 +116,18 @@ jobs:
needs: prepare-publish
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Download Linux release
uses: actions/download-artifact@v1
- name: Download ${{ matrix.os }} release
uses: actions/download-artifact@v2
with:
name: release-tarball
- name: test install
run: npm -g install ./release-tarball/redemon.tgz
run: npm -g install ./redemon.tgz
- name: test binary
run: redemon --help
6 changes: 4 additions & 2 deletions bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ let redemon path paths extensions delay verbose command args =
let is_file_extension e =
String.equal ("." ^ e) file_extension
in
if extensions_provided && List.exists is_file_extension extensions then
stop_program () |> start_program))
if
extensions_provided
&& List.exists is_file_extension extensions
then stop_program () |> start_program))
paths
in
start_program ();
Expand Down