mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 07:55:45 +01:00
optimise CI pipeline by removing vcpkg building from the dockerfile.
This commit is contained in:
10
.github/Dockerfile
vendored
10
.github/Dockerfile
vendored
@@ -4,11 +4,6 @@ FROM debian:testing-slim
|
|||||||
LABEL org.opencontainers.image.source="https://github.com/thepigeongenerator/mcaselector-lite"
|
LABEL org.opencontainers.image.source="https://github.com/thepigeongenerator/mcaselector-lite"
|
||||||
LABEL org.opencontainers.image.source-path="/.github/Dockerfile"
|
LABEL org.opencontainers.image.source-path="/.github/Dockerfile"
|
||||||
|
|
||||||
# set environment variables
|
|
||||||
ENV VCPKG_DISABLE_METRICS="1"
|
|
||||||
ENV VCPKG_ROOT="/opt/vcpkg"
|
|
||||||
ENV PATH="${VCPKG_ROOT}:${PATH}"
|
|
||||||
|
|
||||||
# install the dependencies
|
# install the dependencies
|
||||||
RUN apt update && apt install -y --no-install-recommends \
|
RUN apt update && apt install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
@@ -23,9 +18,4 @@ RUN apt update && apt install -y --no-install-recommends \
|
|||||||
nodejs \
|
nodejs \
|
||||||
&& rm -rf /var/lib/apt/lists/*;
|
&& rm -rf /var/lib/apt/lists/*;
|
||||||
|
|
||||||
# install packages / VCPKG
|
|
||||||
RUN git clone https://github.com/microsoft/vcpkg.git "${VCPKG_ROOT}" \
|
|
||||||
&& "${VCPKG_ROOT}/bootstrap-vcpkg.sh" \
|
|
||||||
&& vcpkg install glfw3:x64-linux-dynamic glfw3:x64-mingw-static;
|
|
||||||
|
|
||||||
CMD ["bash"]
|
CMD ["bash"]
|
||||||
|
|||||||
26
.github/workflows/ci.yaml
vendored
26
.github/workflows/ci.yaml
vendored
@@ -6,8 +6,25 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
|
env:
|
||||||
|
VCPKG_DISABLE_METRICS: 1
|
||||||
|
VCPKG_ROOT: /opt/vcpkg
|
||||||
jobs:
|
jobs:
|
||||||
|
setup-vcpkg:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/thepigeongenerator/mcaselector-lite:latest
|
||||||
|
steps:
|
||||||
|
- run: git clone https://github.com/microsoft/vcpkg.git "${{env.VCPKG_ROOT}}"
|
||||||
|
- run: ${{env.VCPKG_ROOT}}/bootstrap-vcpkg.sh
|
||||||
|
- name: install vcpkg packages
|
||||||
|
run: ${{env.VCPKG_ROOT}}/vcpkg install glfw3:x64-linux-dynamic glfw3:x64-mingw-static;
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: vcpkg
|
||||||
|
path: ${{env.VCPKG_ROOT}}
|
||||||
compile:
|
compile:
|
||||||
|
needs: setup-vcpkg
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/thepigeongenerator/mcaselector-lite:latest
|
image: ghcr.io/thepigeongenerator/mcaselector-lite:latest
|
||||||
@@ -22,6 +39,11 @@ jobs:
|
|||||||
cc: x86_64-w64-mingw32-gcc
|
cc: x86_64-w64-mingw32-gcc
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: vcpkg
|
||||||
|
path: ${{env.VCPKG_ROOT}}
|
||||||
|
# compile
|
||||||
- name: compile ${{matrix.march}}-${{matrix.kernel}}
|
- name: compile ${{matrix.march}}-${{matrix.kernel}}
|
||||||
run: make compile MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
|
run: make compile MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
@@ -46,5 +68,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{matrix.march}}-${{matrix.kernel}}-rel
|
name: ${{matrix.march}}-${{matrix.kernel}}-rel
|
||||||
path: obj/
|
path: obj/
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: vcpkg
|
||||||
|
path: ${{env.VCPKG_ROOT}}
|
||||||
- name: execute tests for ${{matrix.march}}-${{matrix.kernel}}
|
- name: execute tests for ${{matrix.march}}-${{matrix.kernel}}
|
||||||
run: make DEBUG=test run MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
|
run: make DEBUG=test run MARCH=${{matrix.march}} KERNEL=${{matrix.kernel}} CC=${{matrix.cc}} -j
|
||||||
|
|||||||
Reference in New Issue
Block a user