-
Notifications
You must be signed in to change notification settings - Fork 5
97 lines (82 loc) · 2.65 KB
/
build.yml
File metadata and controls
97 lines (82 loc) · 2.65 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
permissions:
contents: read
security-events: write
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
with:
egress-policy: audit
- uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
- name: Setup Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.13'
# - name: Install Subversion (SVN)
# if: matrix.platform == 'macos-latest'
# run: |
# brew install svn
# svn --version # Verify installation
# - name: Install Subversion (SVN)
# if: matrix.platform == 'windows-latest'
# run: |
# choco install svn -y
# $env:PATH = "C:\Program Files (x86)\Subversion\bin;$env:PATH"
# echo "C:\Program Files (x86)\Subversion\bin" >> $env:GITHUB_PATH
# svn --version # Verify installation
- name: ccache
if: matrix.platform == 'ubuntu-latest'
uses: hendrikmuhs/ccache-action@30ae3502c7f2d3200209bf2f90eccef2357896cf # v1.2
with:
key: ${{ github.job }}-${{ matrix.platform }}
verbose: 1
create-symlink: true
- name: Create binary
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_NOHASHDIR: true
NUITKA_CACHE_DIR_CCACHE: $HOME/.ccache
NUITKA_CCACHE_BINARY: /usr/bin/ccache
run: |
pip install .[build]
python script/build.py
- name: Store the distribution packages
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: binary-distribution
path: build/dfetch-*
test-binary:
name: Run binary
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Download the binary artifact
uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c # v5
with:
name: binary-distribution
path: .
- run: ln -sf $(ls dfetch-*-x86_64) dfetch
- run: chmod +x dfetch
- run: ls -la .
- run: ./dfetch init
- run: ./dfetch environment
- run: ./dfetch validate
- run: ./dfetch check
- run: ./dfetch update
- run: ./dfetch update
- run: ./dfetch report -t sbom