summaryrefslogtreecommitdiff
path: root/.github/workflows/freebsd.yml
blob: 94eaf62d5b2f7e3dd74ee5fe783157e33c335d31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
on: [push, pull_request]
name: FreeBSD

jobs:
  build:
    runs-on: 'macos-12'
    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@v3
        with:
          name: dist-for-freebsd-install
          path: '*.tar.gz'
          retention-days: 1
  install-freebsd:
    runs-on: macos-12
    needs: build
    steps:
      - uses: actions/download-artifact@v3
        with:
          name: dist-for-freebsd-install
      - name: Install on FreeBSD
        uses: cross-platform-actions/action@v0.19.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 .