forked from EXTERNAL/bareiron
set up cosmopolitan build workflow
This commit is contained in:
36
.github/workflows/build.yml
vendored
Normal file
36
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Build with Cosmopolitan
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download cosmocc
|
||||
run: |
|
||||
curl -LO https://cosmo.zip/pub/cosmocc/cosmocc.zip
|
||||
unzip cosmocc.zip -d cosmocc
|
||||
echo "$PWD/cosmocc/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Build project
|
||||
run: |
|
||||
cosmocc src/*.c -O3 -Iinclude -o bareiron.exe
|
||||
|
||||
- name: Upload release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: latest
|
||||
name: Latest build
|
||||
files: bareiron.exe
|
||||
overwrite: true
|
||||
prerelease: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -18,6 +18,9 @@
|
||||
#include "lwip/sockets.h"
|
||||
#include "lwip/netdb.h"
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
@@ -7,6 +7,7 @@
|
||||
#include "lwip/netdb.h"
|
||||
#include "esp_timer.h"
|
||||
#else
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
|
Reference in New Issue
Block a user