add all the cool latest bits #101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Tests | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
# no libssl on windows | |
# - windows-latest | |
perl: | |
- '5.22' | |
- '5.32' | |
- '5.38' | |
node: | |
- '20.x' | |
- '21.x' | |
exclude: | |
- os: ubuntu-18.04 | |
perl: '5.22' | |
fail-fast: false | |
name: node-${{ matrix.node }}/perl${{ matrix.perl }}/${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Setup perl | |
uses: shogo82148/actions-setup-perl@v1 | |
with: | |
perl-version: ${{ matrix.perl }} | |
- name: CPAN Cache | |
id: cpan-cache | |
uses: actions/cache@v4 | |
with: | |
path: thirdparty | |
key: ${{ matrix.os }}-cpan-${{ matrix.perl }}-${{ hashFiles('**/Makefile.PL') }}-${{ hashFiles('**/cpanfile') }} | |
- name: Node Cache | |
id: node-cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ matrix.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package.json') }} | |
- name: Prepare | |
run: perl Makefile.PL | |
- name: Make 3rd Party | |
if: steps.cpan-cache.outputs.cache-hit != 'true' | |
run: make thirdparty | |
- name: Build Automake App | |
run: | | |
perl -Ithirdparty/lib/perl5 -Ilib thirdparty/bin/mojo generate automake_app | |
cd my-mojolicious-app | |
ln -s ../../thirdparty/lib thirdparty/lib | |
mkdir -p thirdparty/carton | |
ln -s ../../../thirdparty/lib thirdparty/carton/lib | |
ln -s ../../../thirdparty/bin thirdparty/carton/bin | |
./configure | |
make | |
make test | |
make dist | |
- name: Build Callbackery App | |
run: | | |
perl -Ithirdparty/lib/perl5 -Ilib thirdparty/bin/mojo generate callbackery_app | |
cd my-callbackery-app | |
sudo apt-get install gettext | |
ln -s ../../thirdparty/lib thirdparty/lib | |
mkdir -p thirdparty/carton | |
ln -s ../../../thirdparty/lib thirdparty/carton/lib | |
ln -s ../../../thirdparty/bin thirdparty/carton/bin | |
mkdir -p ../node_modules | |
ln -s ../../node_modules frontend/node_modules | |
cp etc/my-callbackery-app.dist.yaml etc/my-callbackery-app.yaml | |
./configure | |
make || make | |
make test | |
make dist |