Skip to content

Commit e788475

Browse files
authored
Update docker-cached-build.yml (#22)
* Update docker-cached-build.yml * Update template-docker-cached-build.yml --------- Signed-off-by: Miłosz Linkiewicz <[email protected]>
1 parent 9003701 commit e788475

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

.github/workflows/build-baremetal-ubuntu.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ env:
1313
DEBIAN_FRONTEND: "noninteractive"
1414
FFMPEG_COMMIT_ID: "n6.1.1"
1515
BUILD_DIR: "${{ github.workspace }}/build"
16+
BUILD_FFMPEG_DIR: "${{ github.workspace }}/build-ffmpeg"
1617
PREFIX: "${{ github.workspace }}/_install"
1718

1819
defaults:
@@ -44,7 +45,7 @@ jobs:
4445
- name: 'Install OS level dependencies'
4546
run: |
4647
set -exo pipefail && \
47-
mkdir -p "${PREFIX}" "${BUILD_DIR}/ffmpeg" && \
48+
mkdir -p "${PREFIX}" "${BUILD_DIR}" "${BUILD_FFMPEG_DIR}" && \
4849
sudo apt-get update --fix-missing && \
4950
sudo apt-get full-upgrade -y && \
5051
sudo apt-get install --no-install-recommends -y \
@@ -76,9 +77,9 @@ jobs:
7677
- name: 'Download and patch ffmpeg repository'
7778
run: |
7879
set -eo pipefail && \
79-
curl -Lf https://github.com/ffmpeg/ffmpeg/archive/${FFMPEG_COMMIT_ID}.tar.gz | tar -zx --strip-components=1 -C "${BUILD_DIR}/ffmpeg"
80-
patch -d "${BUILD_DIR}/ffmpeg" -p1 -i <(cat "${{ github.workspace }}/ffmpeg/"*.patch)
81-
cp "${{ github.workspace }}/ffmpeg/vf_raisr"*.c "${BUILD_DIR}/ffmpeg/libavfilter"
80+
curl -Lf https://github.com/ffmpeg/ffmpeg/archive/${FFMPEG_COMMIT_ID}.tar.gz | tar -zx --strip-components=1 -C "${BUILD_FFMPEG_DIR}"
81+
patch -d "${BUILD_FFMPEG_DIR}" -p1 -i <(cat "${{ github.workspace }}/ffmpeg/"*.patch)
82+
cp "${{ github.workspace }}/ffmpeg/vf_raisr"*.c "${BUILD_FFMPEG_DIR}/libavfilter"
8283
8384
- name: 'Build RAISR from source code'
8485
run: |
@@ -88,9 +89,9 @@ jobs:
8889
-DCMAKE_CXX_FLAGS="-I/opt/intel/oneapi/ipp/latest/include -I/opt/intel/oneapi/ipp/latest/include/ipp"
8990
9091
- name: 'Configure ffmpeg repository'
91-
working-directory: "ffmpeg"
9292
continue-on-error: true
9393
run: |
94+
cd "${BUILD_FFMPEG_DIR}"
9495
./configure \
9596
--disable-shared \
9697
--disable-debug \
@@ -109,9 +110,9 @@ jobs:
109110
{ tail -n 100 "${BUILD_DIR}/ffmpeg/ffbuild/config.log" && exit 1; }
110111
111112
- name: 'Build, install and check ffmpeg'
112-
working-directory: "ffmpeg"
113113
continue-on-error: true
114114
run: |
115+
cd "${BUILD_FFMPEG_DIR}"
115116
make clean
116117
make -j"$(nproc)"
117118
sudo -E make install

.github/workflows/docker-cached-build.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches: [ "main", "dev" ]
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
1013
concurrency:
1114
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
1215
cancel-in-progress: true
@@ -17,7 +20,6 @@ jobs:
1720
uses: ./.github/workflows/template-docker-cached-build.yml
1821
permissions:
1922
security-events: write
20-
packages: write
2123
contents: read
2224
with:
2325
docker_file_path: "docker/Flex/Dockerfile.ubuntu22.04"
@@ -28,7 +30,6 @@ jobs:
2830
uses: ./.github/workflows/template-docker-cached-build.yml
2931
permissions:
3032
security-events: write
31-
packages: write
3233
contents: read
3334
with:
3435
docker_file_path: "docker/Xeon/Dockerfile.ubuntu18.04"
@@ -39,7 +40,6 @@ jobs:
3940
uses: ./.github/workflows/template-docker-cached-build.yml
4041
permissions:
4142
security-events: write
42-
packages: write
4343
contents: read
4444
with:
4545
docker_file_path: "docker/Xeon/Dockerfile.ubuntu20.04"
@@ -50,7 +50,6 @@ jobs:
5050
uses: ./.github/workflows/template-docker-cached-build.yml
5151
permissions:
5252
security-events: write
53-
packages: write
5453
contents: read
5554
with:
5655
docker_file_path: "docker/Xeon/Dockerfile.ubuntu22.04"
@@ -61,7 +60,6 @@ jobs:
6160
uses: ./.github/workflows/template-docker-cached-build.yml
6261
permissions:
6362
security-events: write
64-
packages: write
6563
contents: read
6664
with:
6765
docker_file_path: "docker/Xeon/Dockerfile.centos9"
@@ -72,7 +70,6 @@ jobs:
7270
uses: ./.github/workflows/template-docker-cached-build.yml
7371
permissions:
7472
security-events: write
75-
packages: write
7673
contents: read
7774
with:
7875
docker_file_path: "docker/Xeon/Dockerfile.rockylinux9-mini"

.github/workflows/template-docker-cached-build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ jobs:
117117
permissions:
118118
contents: read
119119
security-events: write
120-
packages: write
121120
timeout-minutes: 70
122121
env:
123122
BUILDKIT_STEP_LOG_MAX_SIZE: 50000000

0 commit comments

Comments
 (0)