Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
This is my first try at automating building and testing some C code for these platforms: Linux Windows MacOS OpenBSD (arm64 and x86-64) FreeBSD (arm64 and x86-64) NetBSD Oracle Solaris Om...
#8: Post edited
- This is my first try at automating building and testing some C code for these platforms:
- * Linux
- * Windows
- * MacOS
- * OpenBSD (arm64 and x86-64)
- * FreeBSD (arm64 and x86-64)
- * NetBSD
- * Oracle Solaris
- It just builds and runs the tests with make:
- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_linux:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- test_macos:
- runs-on: macos-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- test_bsd:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- os:
- - { name: freebsd, architecture: x86-64, version: '14.0' }
- - { name: freebsd, architecture: arm64, version: '14.0' }
- - { name: openbsd, architecture: x86-64, version: '7.4' }
- - { name: openbsd, architecture: arm64, version: '7.4' }
- - { name: netbsd, architecture: x86-64, version: '9.3' }
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- uses: cross-platform-actions/action@v0.24.0
- with:
- operating_system: ${{ matrix.os.name }}
- architecture: ${{ matrix.os.architecture }}
- version: ${{ matrix.os.version }}
- run: make test
- test_solaris:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- uses: vmactions/solaris-vm@v1
- with:
- run: |
- sudo pkg install developer/gcc/gcc-c-7
- sudo ln -s /usr/bin/gcc /usr/bin/cc
- make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- ```
- ## Review Request:
- Anything, everything. Any simplifications I can make? I also see a lot of duplication in the file.
- This is my first try at automating building and testing some C code for these platforms:
- * Linux
- * Windows
- * MacOS
- * OpenBSD (arm64 and x86-64)
- * FreeBSD (arm64 and x86-64)
- * NetBSD
- * Oracle Solaris
- * OmniOS
- It just builds and runs the tests with make:
- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_linux:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- test_macos:
- runs-on: macos-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- test_bsd:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- os:
- - { name: freebsd, architecture: x86-64, version: '14.0' }
- - { name: freebsd, architecture: arm64, version: '14.0' }
- - { name: openbsd, architecture: x86-64, version: '7.4' }
- - { name: openbsd, architecture: arm64, version: '7.4' }
- - { name: netbsd, architecture: x86-64, version: '9.3' }
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- uses: cross-platform-actions/action@v0.24.0
- with:
- operating_system: ${{ matrix.os.name }}
- architecture: ${{ matrix.os.architecture }}
- version: ${{ matrix.os.version }}
- run: make test
- test_solaris:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- uses: vmactions/solaris-vm@v1
- with:
- run: |
- sudo pkg install developer/gcc/gcc-c-7
- sudo ln -s /usr/bin/gcc /usr/bin/cc
- make test
- test_omnios:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- uses: vmactions/omnios-vm@v1
- with:
- run: |
- sudo pkg install build-essential
- make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- ```
- ## Review Request:
- Anything, everything. Any simplifications I can make? I also see a lot of duplication in the file.
#6: Post edited
This is my first try at automating building and testing some code for Linux, MacOS, and Windows (this took the longest to set up). It just builds and runs the tests with make:- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
test_unixy:runs-on: ${{ matrix.os }}- strategy:
- matrix:
os: [ubuntu-latest, macos-latest]- steps:
- - name: Checkout
- uses: actions/checkout@v4
- name: Buildrun: make- name: Testrun: make test- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- name: Buildrun: make- name: Test- run: make test
- ```
- ## Review Request:
Anything, everything. Any simplifications I can make?
- This is my first try at automating building and testing some C code for these platforms:
- * Linux
- * Windows
- * MacOS
- * OpenBSD (arm64 and x86-64)
- * FreeBSD (arm64 and x86-64)
- * NetBSD
- * Oracle Solaris
- It just builds and runs the tests with make:
- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_linux:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- test_macos:
- runs-on: macos-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- test_bsd:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- os:
- - { name: freebsd, architecture: x86-64, version: '14.0' }
- - { name: freebsd, architecture: arm64, version: '14.0' }
- - { name: openbsd, architecture: x86-64, version: '7.4' }
- - { name: openbsd, architecture: arm64, version: '7.4' }
- - { name: netbsd, architecture: x86-64, version: '9.3' }
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- uses: cross-platform-actions/action@v0.24.0
- with:
- operating_system: ${{ matrix.os.name }}
- architecture: ${{ matrix.os.architecture }}
- version: ${{ matrix.os.version }}
- run: make test
- test_solaris:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- uses: vmactions/solaris-vm@v1
- with:
- run: |
- sudo pkg install developer/gcc/gcc-c-7
- sudo ln -s /usr/bin/gcc /usr/bin/cc
- make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build and Test
- run: make test
- ```
- ## Review Request:
- Anything, everything. Any simplifications I can make? I also see a lot of duplication in the file.
#4: Post edited
- This is my first try at automating building and testing some code for Linux, MacOS, and Windows (this took the longest to set up). It just builds and runs the tests with make:
- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_unixy:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make
- - name: Test
- run: make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
run: make CC=gcc- - name: Test
run: make CC=gcc test- ```
For windows-latest, `CC=gcc` is specified because the Makefile uses `CC=gcc-13`, and no `gcc-13` was found for installation on Windows.- ## Review Request:
- Anything, everything. Any simplifications I can make?
- This is my first try at automating building and testing some code for Linux, MacOS, and Windows (this took the longest to set up). It just builds and runs the tests with make:
- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_unixy:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make
- - name: Test
- run: make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make
- - name: Test
- run: make test
- ```
- ## Review Request:
- Anything, everything. Any simplifications I can make?
#3: Post edited
- This is my first try at automating building and testing some code for Linux, MacOS, and Windows (this took the longest to set up). It just builds and runs the tests with make:
- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_unixy:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make
- - name: Test
- run: make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make CC=gcc
- - name: Test
- run: make CC=gcc test
- ```
For windows `CC=gcc` is provided because the Makefile uses `CC=gcc-13`, and no `gcc-13` was found for installation on Windows.- ## Review Request:
- Anything, everything. Any simplifications I can make?
- This is my first try at automating building and testing some code for Linux, MacOS, and Windows (this took the longest to set up). It just builds and runs the tests with make:
- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_unixy:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make
- - name: Test
- run: make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make CC=gcc
- - name: Test
- run: make CC=gcc test
- ```
- For windows-latest, `CC=gcc` is specified because the Makefile uses `CC=gcc-13`, and no `gcc-13` was found for installation on Windows.
- ## Review Request:
- Anything, everything. Any simplifications I can make?
#2: Post edited
- This is my first try at automating building and testing some code for Linux, MacOS, and Windows (this took the longest to set up). It just builds and runs the tests with make:
```c- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_unixy:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make
- - name: Test
- run: make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make CC=gcc
- - name: Test
- run: make CC=gcc test
- ```
- For windows `CC=gcc` is provided because the Makefile uses `CC=gcc-13`, and no `gcc-13` was found for installation on Windows.
- ## Review Request:
- Anything, everything. Any simplifications I can make?
- This is my first try at automating building and testing some code for Linux, MacOS, and Windows (this took the longest to set up). It just builds and runs the tests with make:
- ```yaml
- name: Arena Tests
- on: [workflow_dispatch, push, pull_request]
- jobs:
- test_unixy:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-latest, macos-latest]
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make
- - name: Test
- run: make test
- test_windows:
- runs-on: windows-latest
- defaults:
- run:
- shell: msys2 {0}
- steps:
- - name: Setup MSYS2
- uses: msys2/setup-msys2/@v2
- with:
- update: true
- install: >-
- git
- make
- gcc
- - name: Checkout
- uses: actions/checkout@v4
- - name: Build
- run: make CC=gcc
- - name: Test
- run: make CC=gcc test
- ```
- For windows `CC=gcc` is provided because the Makefile uses `CC=gcc-13`, and no `gcc-13` was found for installation on Windows.
- ## Review Request:
- Anything, everything. Any simplifications I can make?
#1: Initial revision
Github workflow for a C application
This is my first try at automating building and testing some code for Linux, MacOS, and Windows (this took the longest to set up). It just builds and runs the tests with make: ```c name: Arena Tests on: [workflow_dispatch, push, pull_request] jobs: test_unixy: runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest] steps: - name: Checkout uses: actions/checkout@v4 - name: Build run: make - name: Test run: make test test_windows: runs-on: windows-latest defaults: run: shell: msys2 {0} steps: - name: Setup MSYS2 uses: msys2/setup-msys2/@v2 with: update: true install: >- git make gcc - name: Checkout uses: actions/checkout@v4 - name: Build run: make CC=gcc - name: Test run: make CC=gcc test ``` For windows `CC=gcc` is provided because the Makefile uses `CC=gcc-13`, and no `gcc-13` was found for installation on Windows. ## Review Request: Anything, everything. Any simplifications I can make?