-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (53 loc) · 1.61 KB
/
test.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Run autotest
on:
workflow_dispatch:
inputs:
ruri_version:
description: "Optional: ruri version to use as tag_name (leave blank to use the latest remote version)"
required: false
release_name:
description: "Optional: Custom release name (ruri v* release)"
required: false
push:
branches: [ "main" ]
paths:
- 'src/**'
- 'build/**'
- 'test/**'
- 'configure'
- 'Makefile'
pull_request:
jobs:
check_update:
name: Check update
runs-on: ubuntu-latest
steps:
- name: Check latest version
id: check_version
run: |
remote_version=$(curl -L https://api.github.com/repos/Moe-hacker/ruri/releases/latest | jq -r .tag_name)
remote_name=$(curl -L https://api.github.com/repos/Moe-hacker/ruri/releases/latest | jq -r .name)
echo "remote_version=$remote_version" | tee -a $GITHUB_OUTPUT
echo "remote_name=$remote_name" | tee -a $GITHUB_OUTPUT
outputs:
remote_version: ${{ steps.check_version.outputs.remote_version }}
remote_name: ${{ steps.check_version.outputs.remote_name }}
build:
name: Build
needs: check_update
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Test
run: |
sudo apt update&&sudo apt install -y git wget
yes | sudo apt install --no-install-recommends -y curl xz-utils \
make \
clang \
libseccomp-dev \
libcap-dev \
libc6-dev \
binutils qemu-user-static uidmap
make test