-
Notifications
You must be signed in to change notification settings - Fork 8
91 lines (75 loc) · 2.24 KB
/
monthly-linux.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: monthly linux
on:
workflow_dispatch:
schedule:
- cron: '0 3 1 * *' # run at 3 AM UTC on the 1st day of every month
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
linux-build:
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- PLATFORM: 'linux64'
PYTHON_ARCH: 'x64'
VS_ARCH: 'amd64'
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11.3
uses: actions/setup-python@v2
with:
python-version: "3.11.3"
- name: Install Mesa
run: |
sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt update
sudo apt upgrade
sudo apt-get install xvfb
- name: print structure
run: |
python3 meson_scripts/print_tools.py
- name: Install dependencies
run: |
python3 -m pip install -r requirements.txt
python3 -m pip install flake8
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Install docker
run: |
python3 -m pip install docker
- name: Init submodule
run: |
git submodule init
git submodule update
- name: Generate files
run: |
python3 generate.py
- name: Cythonize
run: |
python3 cythonize_files.py
- name: Create plugin
run: |
python3 create_plugin.py
- name: Upload build output as an artifact
uses: actions/upload-artifact@v3
with:
name: build-artifact
path: ./plugin
- name: print structure
run: |
python3 meson_scripts/print_tools.py