forked from ruby-gnome/ruby-gnome
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (72 loc) · 2.12 KB
/
linux.yml
File metadata and controls
72 lines (72 loc) · 2.12 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Linux
on:
- push
- pull_request
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
service:
- almalinux-8
- almalinux-9
- apache-arrow
- arch-linux
- centos-7
# - fedora-arm32v7-rawhide
# - fedora-rawhide
- ruby-2.7
- ruby-3.0
- ruby-3.1
- ubuntu-18.04
- ubuntu-20.04
- ubuntu-22.04
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: docker/login-action@v1
if: |
github.event_name == 'push'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Workaround for Docker
# https://github.com/actions/virtual-environments/issues/5490#issuecomment-1118328567
run: |
sudo rm /etc/docker/daemon.json
sudo systemctl restart docker
- name: Pull Docker images
run: |
docker-compose pull --ignore-pull-failures ${{ matrix.service }}-base || :
docker-compose pull --ignore-pull-failures ${{ matrix.service }} || :
- name: Build Docker image
run: |
docker-compose build ${{ matrix.service }}
- name: Push Docker images
if: |
github.event_name == 'push'
run: |
docker-compose push --ignore-push-failures ${{ matrix.service }} || :
- name: Cache ccache
if: |
matrix.service == 'apache-arrow'
uses: actions/cache@v3
with:
path: .ccache
key: arrow-ccache-docker-${{ matrix.service }}-${{ github.sha }}
restore-keys: arrow-ccache-docker-${{ matrix.service }}-
- name: Adjust permission for cache
if: |
matrix.service == 'apache-arrow'
run: |
mkdir -p .ccache
chmod -R a+rwx .ccache
- name: Register problem matchers
run: |
echo ::add-matcher::dockerfiles/problem-matchers.json
- name: Run
run: |
docker-compose run --rm ${{ matrix.service }}