Skip to content

Commit

Permalink
MacOS support and tester
Browse files Browse the repository at this point in the history
  • Loading branch information
timlegge committed Apr 25, 2021
1 parent 798b138 commit e884f80
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

name: macos

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
perl:

runs-on: macOS-latest

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: Set up Perl
run: |
brew install perl
curl https://cpanmin.us | perl - App::cpanminus -n
echo "/Users/runner/perl5/bin" >> $GITHUB_PATH
- name: perl -V
run: perl -V

- name: Run Tests
run: |
curl -sL https://cpanmin.us/ | perl - -nq --with-develop --installdeps -v .
perl Makefile.PL
make
make test
8 changes: 6 additions & 2 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ if (-d "/usr/include/openssl") {
} elsif (-d "/usr/local/ssl/include") {
cc_inc_paths('/usr/local/ssl/include');
cc_lib_paths('/usr/local/ssl/lib');
} elsif (-d "/usr/local/opt/openssl/include") {
cc_inc_paths('/usr/local/opt/openssl/include');
}

cc_lib_links('crypto');

my $ccflags = '';
if ($Config::Config{ccname} =~ /gcc/i) {
$ccflags = $ENV{AUTHOR_TESTING} ? '-Wall -Werror': '-Wall';
Expand All @@ -72,8 +72,12 @@ if ($Config::Config{ccname} =~ /gcc/i) {
}

if (($Config::Config{myuname} =~ /sunos|solaris/i) && ($Config::Config{PATCHLEVEL} =~ /5.20/)) {
cc_lib_links('crypto');
cc_optimize_flags("-O3 -DOPENSSL_API_COMPAT=0x10100000L");
} elsif ($Config::Config{myuname} =~ /darwin/i) {
cc_optimize_flags("-O3 -DOPENSSL_API_COMPAT=0x10100000L");
} else {
cc_lib_links('crypto');
cc_optimize_flags("-O3 $ccflags -DOPENSSL_API_COMPAT=0x10100000L");
}

Expand Down

0 comments on commit e884f80

Please sign in to comment.