Skip to content

Commit

Permalink
Merge 443387a into 716778d
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Apr 22, 2022
2 parents 716778d + 443387a commit 3fe64aa
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 79 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/busted.yml
@@ -1,21 +1,21 @@
name: Busted

on: [push, pull_request]
on: [ push, pull_request ]

jobs:

busted:
strategy:
fail-fast: false
matrix:
luaVersion: ["5.4", "5.3", "5.2", "5.1", "luajit", "luajit-openresty"]
penlightVersion: ["1.9.2", "1.8.0", "1.6.0", "1.5.4"]
luaVersion: [ "5.4", "5.3", "5.2", "5.1", "luajit", "luajit-openresty" ]
penlightVersion: [ "1.12.0", "1.9.2", "1.8.0", "1.6.0", "1.5.4" ]
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v8
uses: leafo/gh-actions-lua@v9
with:
luaVersion: ${{ matrix.luaVersion }}
- name: Setup ‘luarocks’
Expand Down
81 changes: 22 additions & 59 deletions .github/workflows/deploy.yml
@@ -1,71 +1,34 @@
name: Deploy

on:
push:
paths:
- rockspecs/*.rockspec
on: [ push, workflow_dispatch ]

jobs:

affected:
runs-on: ubuntu-20.04
outputs:
rockspecs: '["${{ steps.changed-files.outputs.all_modified_files }}"]'
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- id: changed-files
uses: tj-actions/changed-files@v1.0.2
with:
files: rockspecs/*.rockspec
separator: '", "'
uses: lunarmodules/.github/.github/workflows/list_affected_rockspecs.yml@main

build:
needs: affected
if: ${{ needs.affected.outputs.rockspecs }}
strategy:
fail-fast: false
matrix:
# Upstream Issue: https://github.com/leafo/gh-actions-luarocks/issues/8
luaVersion: ["5.4", "5.3", "5.2", "5.1"] #, "luajit", "luajit-openresty"]
# Upstream Issue: https://github.com/leafo/gh-actions-luarocks/issues/8
luarocksVersion: ["3.1.3"] # , "2.4.2"]
rockspec: ${{ fromJSON(needs.affected.outputs.rockspecs) }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v8
with:
luaVersion: ${{ matrix.luaVersion }}
- name: Setup ‘luarocks’
uses: leafo/gh-actions-luarocks@v4
with:
luarocksVersion: ${{ matrix.luarocksVersion }}
- name: Confirm rockspec builds
run: |
luarocks --lua-version ${{ matrix.luaVersion }} --local build -- ${{ matrix.rockspec }}
uses: lunarmodules/.github/.github/workflows/test_build_rock.yml@main
with:
rockspecs: ${{ needs.affected.outputs.rockspecs }}

upload:
needs: [affected, build]
if: ${{ needs.affected.outputs.rockspecs && github.ref == 'refs/heads/master' && github.repository == 'sile-typesetter/cassowary.lua' }}
strategy:
fail-fast: false
matrix:
rockspec: ${{ fromJSON(needs.affected.outputs.rockspecs) }}
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v8
- name: Setup ‘luarocks’
uses: leafo/gh-actions-luarocks@v4
- name: Setup dependencies
run: |
luarocks install dkjson
- run: |
luarocks upload --force --api-key ${{ secrets.LUAROCKS_APIKEY }} -- ${{ matrix.rockspec }}
needs: [ affected, build ]
# Only run upload if:
# 1. Some rockspecs were changed — this implies the commit changing the rockspec is the same one that gets tagged
# 2. The current commit is either tagged or on the default branch (the workflow will upload dev/scm rockspecs any
# time they are touched, tagged ones whenever the edited rockspec and tag match)
# 3. We are on the canonical repository (no uploads from forks)
if: >-
${{
github.repository == 'sile-typesetter/cassowary.lua' &&
( github.ref_name == 'master' || startsWith(github.ref, 'refs/tags/') ) &&
needs.affected.outputs.rockspecs
}}
uses: lunarmodules/.github/.github/workflows/upload_to_luarocks.yml@main
with:
rockspecs: ${{ needs.affected.outputs.rockspecs }}
secrets:
apikey: ${{ secrets.LUAROCKS_APIKEY }}
2 changes: 1 addition & 1 deletion .github/workflows/luacheck.yml
@@ -1,6 +1,6 @@
name: Luacheck

on: [push, pull_request]
on: [ push, pull_request ]

jobs:

Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/luarocks.yml
@@ -1,21 +1,25 @@
name: Luarocks

on: [push, pull_request]
on: [ push, pull_request ]

jobs:

luarocks:
# More extensive testing gets done when a rockspec is touched, this just
# makes sure expected files didn't shift without updating the rockspec
build:
name: Test bulid on Linux
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v8
- name: Setup ‘luarocks’
uses: leafo/gh-actions-luarocks@v4
- name: Luarocks lint
run: |
luarocks --local lint -- cassowary-scm-0.rockspec
- name: Luarocks make
run: |
luarocks --local make -- cassowary-scm-0.rockspec
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup ‘lua’
uses: leafo/gh-actions-lua@v9
- name: Setup ‘luarocks’
uses: leafo/gh-actions-luarocks@v4
- name: Luarocks lint
run: |
luarocks lint -- cassowary-scm-0.rockspec
- name: Luarocks make
run: |
luarocks make -- cassowary-scm-0.rockspec

0 comments on commit 3fe64aa

Please sign in to comment.