Skip to content

fixed

fixed #8

Workflow file for this run

name: "Build and Test"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_DIR: builds
jobs:
build-and-test:
strategy:
matrix:
os-version: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os-version }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up C/C++ compiler
id: setup_compiler
uses: rlalik/setup-cpp-compiler@master
with:
compiler: gcc-latest
- name: Compile and build executable
run: |
gcc -o ${{ env.BUILD_DIR }}/largeintcalculator largeintcalculator.c
# On Windows, rename the executable to .exe
if [[ "$RUNNER_OS" == "Windows" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator.exe ${{ env.BUILD_DIR }}/windows/largeintcalculator.exe
elif [[ "$RUNNER_OS" == "Linux" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/ubuntu/largeintcalculator
elif [[ "$RUNNER_OS" == "macOS" ]]; then
mv ${{ env.BUILD_DIR }}/largeintcalculator ${{ env.BUILD_DIR }}/macos/largeintcalculator
fi
working-directory: ${{ github.workspace }}