-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (64 loc) · 2.2 KB
/
Copy pathmake-multi-platform.yml
File metadata and controls
73 lines (64 loc) · 2.2 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
name: Make on multiple platforms
on:
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc]
output_name: [page, page.exe]
include:
- os: ubuntu-latest
output_name: page
- os: windows-latest
output_name: page.exe
exclude:
- os: windows-latest
output_name: page
- os: ubuntu-latest
output_name: page.exe
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Create build directory
run: mkdir -p ${{ steps.strings.outputs.build-output-dir }}
- name: Install compiler
id: install_cc
uses: rlalik/setup-cpp-compiler@master
with:
compiler: ${{ matrix.c_compiler }}
- name: Build
working-directory: ./PAGE
run: make all CC=${{ matrix.c_compiler }} CPPC=${{ matrix.cpp_compiler }} BTYPE=${{ matrix.build_type }} BDIR=${{ steps.strings.outputs.build-output-dir }}
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: Build ${{ github.run_number }} ${{ matrix.os }} ${{ matrix.build_type }}
tag_name: v${{ github.run_number }}-${{ matrix.os }}-${{ matrix.build_type }}
body: |
Changes in this Release
- Build ${{ github.run_number }}
- Commit: ${{ github.sha }}
- Commit message: ${{ github.event.head_commit.message }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload linux artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.strings.outputs.build-output-dir }}/${{ matrix.output_name }}
asset_name: page-${{ matrix.os }}-${{ matrix.build_type }}
asset_content_type: application/octet-stream