diff --git a/.cirrus.yml b/.cirrus.yml index c02ab8a..171b6a6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,15 +1,3 @@ -task: - name: FreeBSD - freebsd_instance: - image_family: freebsd-13-0-snap - test_script: - - pkg install -y perl5 - - echo|cpan App::cpanminus - - cpanm --installdeps . - - perl Makefile.PL - - make - - make test - task: name: MacOS macos_instance: diff --git a/.github/workflows/install-freebsd.yml b/.github/workflows/install-freebsd.yml new file mode 100644 index 0000000..6a5ce5c --- /dev/null +++ b/.github/workflows/install-freebsd.yml @@ -0,0 +1,43 @@ +on: [push, pull_request] +name: FreeBSD install + +jobs: + build: + runs-on: 'macos-10.15' + steps: + - uses: actions/checkout@v3 + - name: Setup Perl environment + uses: shogo82148/actions-setup-perl@v1 + - name: Test and build + run: | + cpanm --installdeps . + perl Makefile.PL + make test + make dist + - uses: actions/upload-artifact@v2 + with: + name: dist-for-freebsd-install + path: '*.tar.gz' + retention-days: 1 + install-freebsd: + runs-on: macos-10.15 + needs: build + steps: + - uses: actions/download-artifact@v2 + with: + name: dist-for-freebsd-install + - name: Install on FreeBSD + uses: cross-platform-actions/action@v0.10.0 + with: + operating_system: freebsd + version: 13.1 + shell: bash + run: | + mkdir dist-for-test && + tar -C dist-for-test -xzf *.tar.gz && + cd dist-for-test/* && + sudo pkg install -y perl5 && + cpan App::cpanminus && + /home/runner/perl5/bin/cpanm --installdeps . && + /home/runner/perl5/bin/cpanm -v . +