Skip to content

Commit

Permalink
Exporting builds to different files
Browse files Browse the repository at this point in the history
  • Loading branch information
Keidan committed Mar 6, 2022
1 parent bd63e17 commit d66c69c
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 97 deletions.
95 changes: 0 additions & 95 deletions .github/workflows/build.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This is a basic workflow to help you get started with Actions

name: Linux

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: Ubuntu Latest GCC
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install cmake ninja-build python3
ninja --version
cmake --version
gcc --version
python --version
- name: Configure for debug
shell: bash
run: cmake -S . -B build -DDISTRIBUTION=debug -G "Ninja"
- name: Build debug
shell: bash
run: cmake --build build
- name: Run gtest
shell: bash
run: |
./bin/hex2bin_gtest
- name: Run test
shell: bash
run: |
python test.py --file bin/hex2bin
- name: Configure for release
shell: bash
run: cmake -S . -B build -DDISTRIBUTION=release -G "Ninja"
- name: Build release
shell: bash
run: cmake --build build
- name: Run test
shell: bash
run: |
python test.py --file bin/hex2bin
55 changes: 55 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This is a basic workflow to help you get started with Actions

name: Build

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: Windows 2019 MSVC
# The type of runner that the job will run on
runs-on: windows-2019

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Install dependencies
run: |
choco install python3
python --version
- name: Configure for debug
shell: bash
run: cmake -S . -B build -DDISTRIBUTION=debug -G "Visual Studio 16 2019"
- name: Build debug
shell: bash
run: cmake --build build
- name: Run gtest
shell: bash
run: |
./bin/Debug/hex2bin_gtest.exe
- name: Run test
shell: bash
run: |
python test.py --file bin/Debug/hex2bin.exe
- name: Configure for release
shell: bash
run: cmake -S . -B build -DDISTRIBUTION=release -G "Visual Studio 16 2019"
- name: Build release
shell: bash
run: cmake --build build
- name: Run test
shell: bash
run: |
python test.py --file bin/Release/hex2bin.exe
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# hex2bin
[![Build Status](https://github.com/Keidan/hex2bin/actions/workflows/build.yml/badge.svg)][build]
[![Linux CI](https://github.com/Keidan/hex2bin/actions/workflows/linux.yml/badge.svg)][linuxCI]
[![Windows CI](https://github.com/Keidan/hex2bin/actions/workflows/windows.yml/badge.svg)][windowsCI]
[![CodeFactor](https://www.codefactor.io/repository/github/keidan/hex2bin/badge)][codefactor]
[![Release](https://img.shields.io/github/v/release/Keidan/hex2bin.svg?logo=github)][releases]
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)][license]
Expand Down Expand Up @@ -65,7 +66,8 @@ _For Windows, remember to add .exe after the binary name._

[GPLv3](https://github.com/Keidan/hex2bin/blob/master/license.txt)

[build]: https://github.com/Keidan/hex2bin/actions
[linuxCI]: https://github.com/Keidan/hex2bin/actions?query=workflow%3ALinux
[windowsCI]: https://github.com/Keidan/hex2bin/actions?query=workflow%3AWindows
[codefactor]: https://www.codefactor.io/repository/github/keidan/hex2bin
[releases]: https://github.com/Keidan/hex2bin/releases
[license]: https://github.com/Keidan/hex2bin/blob/master/license.txt

0 comments on commit d66c69c

Please sign in to comment.