Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Code Reviews

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

77%
+5 −0
Code Reviews Github workflow for a C application

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...

1 answer  ·  posted 7mo ago by Melkor-1‭  ·  last activity 4mo ago by zmzaps‭

Question yaml github ci/cd
#8: Post edited by user avatar Melkor-1‭ · 2024-04-28T17:58:14Z (7 months ago)
  • 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.
#7: Post undeleted by user avatar Melkor-1‭ · 2024-04-28T12:19:17Z (7 months ago)
#6: Post edited by user avatar Melkor-1‭ · 2024-04-28T12:19:01Z (7 months ago)
  • 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?
  • 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.
#5: Post deleted by user avatar Melkor-1‭ · 2024-04-27T03:01:56Z (7 months ago)
#4: Post edited by user avatar Melkor-1‭ · 2024-04-25T15:11:13Z (7 months ago)
  • 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 by user avatar Melkor-1‭ · 2024-04-25T00:34:59Z (7 months ago)
  • 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 by user avatar Melkor-1‭ · 2024-04-24T20:35:37Z (7 months ago)
  • 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 by user avatar Melkor-1‭ · 2024-04-24T20:35:16Z (7 months ago)
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?