forked from github/backup-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.4 KB
/
main.yml
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
name: Test and build
on: [pull_request]
jobs:
build:
strategy:
matrix:
# macos-latest references are kept here for historical purposes. removed macos-latest from the
#matrix as it is not a typical case for users and causes a lot of friction with other linux-based
# installs. Recommend developing on codespaces or using an ubuntu container.
os: ['ubuntu-22.04', 'ubuntu-20.04']
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Install Dependencies (Linux)
run: |
sudo apt-get update -y
sudo apt-get install -y devscripts debhelper moreutils fakeroot jq pigz help2man
wget "https://github.com/koalaman/shellcheck/releases/download/latest/shellcheck-latest.linux.x86_64.tar.xz"
tar --xz -xvf "shellcheck-latest.linux.x86_64.tar.xz"
sudo cp shellcheck-latest/shellcheck /usr/bin/shellcheck
if: matrix.os != 'macos-latest'
- name: Install Dependencies (macOS)
run: |
brew install gnu-tar shellcheck jq pigz coreutils gnu-sed gnu-getopt wget
brew install moreutils gawk
if: matrix.os == 'macos-latest'
- name: Get Sources
uses: actions/checkout@v3
- name: Test
run: |
export PATH="$PATH:/snap/bin"
make test
shell: bash
- name: Build (Linux)
run: DEB_BUILD_OPTIONS=nocheck debuild -us -uc
if: matrix.os != 'macos-latest'