forked from elfmz/far2l
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.88 KB
/
artifacts.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
name: Artifacts
on:
push:
branches:
- master
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository != 'elfmz/far2l') }}
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac.
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dependencies: "-minimal"
- dependencies: ""
options: "-DPYTHON=yes"
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: sudo apt-get update ; sudo apt-get -y install $(cat dependencies${{ matrix.dependencies }}.txt)
- name: Create Build Environment
# Create a separate build directory as working directory for all subsequent commands
run: mkdir -p _build
- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
shell: bash
# -S and -B options specify source and build directories
run: cmake -S . -B _build -Wno-dev -DCMAKE_BUILD_TYPE=$BUILD_TYPE ${{ matrix.options }}
- name: Build
shell: bash
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
cmake --build _build --config $BUILD_TYPE
- name: File Tree
shell: bash
run: tree _build
- name: Packing Artifact
uses: actions/upload-artifact@v4
with:
name: far2l-release${{ matrix.dependencies }}
path: _build/install
- name: Test
working-directory: _build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE