Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

165 dont include sdk include in the public include fields of clib4 #170

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e9e1a01
Merge pull request #159 from afxgroup/beta10
afxgroup Oct 25, 2023
5e73b5a
Added more jobs
walkero-gr Jan 15, 2024
6e9cda1
Renamed the PR action
walkero-gr Jan 15, 2024
1ebe527
Merge pull request #1 from walkero-gr/actions-cicd
walkero-gr Jan 15, 2024
2bf59d7
Fixes and removal of duplicate job
walkero-gr Jan 15, 2024
1d74fd7
Merge pull request #2 from walkero-gr/actions-cicd
walkero-gr Jan 15, 2024
3de8151
Added DEB creation and some fixes in PR action
walkero-gr Jan 15, 2024
23f5a7f
Merge pull request #3 from walkero-gr/actions-cicd
walkero-gr Jan 15, 2024
da17a46
A small fix
walkero-gr Jan 15, 2024
db2735d
Use checkout 4 and restrict the merge job when PR is merged
walkero-gr Jan 15, 2024
7dbbde9
Merge pull request #4 from walkero-gr/actions-cicd
walkero-gr Jan 15, 2024
3155d38
Added action to upload to ssh server
walkero-gr Jan 15, 2024
1c8796b
Merge pull request #5 from walkero-gr/actions-cicd
walkero-gr Jan 15, 2024
e61921f
Changed the SCP action to one that can have commands executed before …
walkero-gr Jan 15, 2024
b66a5ab
Removed the dash
walkero-gr Jan 15, 2024
142d3f8
Merge pull request #163 from walkero-gr/actions-cicd
afxgroup Jan 16, 2024
a46656e
Merge branch 'AmigaLabs:master' into master
walkero-gr Jan 16, 2024
66ccb54
Disabled for now the automatic release to OS4Depot
walkero-gr Jan 16, 2024
95f7b1d
Merge pull request #164 from walkero-gr/disable-os4depot-release
afxgroup Jan 16, 2024
e2488ec
Set version from git tag on release action
walkero-gr Mar 16, 2024
d80a03a
A small teml change in action
walkero-gr Mar 16, 2024
6a4bb71
Disabled Upload DEB release file to the server for the tests
walkero-gr Mar 16, 2024
5083ca5
Reversed previous changes and used sed
walkero-gr Mar 16, 2024
ae2761d
Reverse changes
walkero-gr Mar 16, 2024
38f1fea
Some fixes in makefile
walkero-gr Mar 16, 2024
6e479f5
Minor changes before PR
walkero-gr Mar 16, 2024
5df86b2
Merge pull request #169 from walkero-gr/add-version-while-compile
afxgroup Mar 17, 2024
ffde186
Merge branch 'AmigaLabs:master' into 165-dont-include-sdk-include-in-…
migthymax Mar 21, 2024
ea37739
Made pthread_mutex, pthread_cond, pthread_rwlock public again
migthymax Mar 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .github/workflows/ci.yml

This file was deleted.

53 changes: 46 additions & 7 deletions .github/workflows/makeRelease.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Make a new release
on:
release:
branches:
- master
types:
- published

Expand All @@ -14,16 +16,19 @@ jobs:
- '${{ github.workspace }}:/opt/code'
steps:
- name: Pull code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Compile clib4
run: |
cd /opt/code && \
make -j1 -f GNUmakefile.os4 OS=os4 SHARED=no
- name: Create the release archive
make -j1 -f GNUmakefile.os4 OS=os4 SHARED=no GITTAG=${{ github.event.release.tag_name }}
- name: Create the LHA release archive
run: |
make -f GNUmakefile.os4 release && \
mv clib4.lha clib4-${{ github.event.release.tag_name }}.lha
- name: Upload Release Asset
- name: Create the DEB release archive
run: |
make -f GNUmakefile.os4 dpkg DPKG_LIB=clib4-${{ github.event.release.tag_name }}_amd64
- name: Upload LHA release file in GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -32,7 +37,41 @@ jobs:
asset_path: /opt/code/clib4-${{ github.event.release.tag_name }}.lha
asset_name: clib4-${{ github.event.release.tag_name }}.lha
asset_content_type: application/x-lzh-compressed
- name: Upload DEB release file in GitHub
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: /opt/code/clib4-${{ github.event.release.tag_name }}_amd64.deb
asset_name: clib4-${{ github.event.release.tag_name }}_amd64.deb
asset_content_type: application/vnd.debian.binary-pac
- name: Upload DEB release file to the server
uses: kostya-ten/ssh-server-deploy@v4
with:
host: ${{ secrets.DEBSERVER_HOST }}
port: ${{ secrets.DEBSERVER_PORT }}
username: ${{ secrets.DEBSERVER_USERNAME }}
private_key: ${{ secrets.DEBSERVER_PRIVATE_KEY }}
scp_source: clib4-${{ github.event.release.tag_name }}_amd64.deb
scp_target: /opt/amigarepo/ubuntu/pool/main
before_script: |
rm /opt/amigarepo/ubuntu/pool/main/clib4*.deb
after_script: |
/root/regenerate-packages.sh
# - name: Prepare OS4Depot release
# run: |
# mkdir os4depot-release
# cp clib4-${{ github.event.release.tag_name }}.lha ./os4depot-release/clib4.lha
# cp ./os4depot.readme ./os4depot-release/clib4_lha.readme
# sed -i "s/VERSION_TAG/${{ github.event.release.tag_name }}/" ./os4depot-release/os4depot.readme
# sed -i "s/OS4DEPOT_PASSPHRASE/${{ secrets.OS4DEPOT_PASSPHRASE }}/" ./os4depot-release/os4depot.readme
# - name: Release on OS4Depot
# - name: Release on Aminet
# - name: Prepare Ubuntu apt packages
# - name: Release on Ubuntu apt server
# uses: SamKirkland/FTP-Deploy-Action@v4.3.4
# with:
# server: os4depot.net
# port: 21
# username: ftp
# password:
# server-dir: ./upload
# local-dir: /opt/code/os4depot-release/
26 changes: 26 additions & 0 deletions .github/workflows/mergeMaster.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Merge into master build
on:
pull_request:
branches:
- master
types:
- closed

jobs:
run_if_merged:
if: github.event.pull_request.merged == true
name: Build latest code
runs-on: ubuntu-latest
container:
image: walkero/amigagccondocker:os4-gcc11-exp
volumes:
- '${{ github.workspace }}:/opt/code'
steps:
- name: Pull code
uses: actions/checkout@v4
- name: Compile clib4
run: |
cd /opt/code && \
make -j1 -f GNUmakefile.os4 OS=os4 SHARED=no
- name: Create the release archive
run: make -f GNUmakefile.os4 release
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build with Docker
name: Pull request build
on:
push:
pull_request:
branches:
- master
- actions-cicd
pull_request:
workflow_dispatch:
types:
- opened
- reopened

jobs:
run:
Expand All @@ -17,7 +17,7 @@ jobs:
- '${{ github.workspace }}:/opt/code'
steps:
- name: Pull code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Compile clib4
run: |
cd /opt/code && \
Expand Down
55 changes: 0 additions & 55 deletions .github/workflows/purge_artifacts.sh

This file was deleted.

41 changes: 35 additions & 6 deletions GNUmakefile.os4
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
##############################################################################

.PHONY : all prepare all-targets all-libs clean \
version compile-tests install release dpkg
gitver version compile-tests install release dpkg

# You may have to change the following sets of macro definitions which will
# be used throughout the build makefile. These definitions cover the paths
Expand Down Expand Up @@ -55,7 +55,7 @@ LIB_ROOT ?= $(shell pwd)
LIB_DIR = $(LIB_ROOT)/library
BUILD_DIR = $(LIB_ROOT)/build
OUTPUT_LIB = $(BUILD_DIR)/lib
DPKG_LIB = clib4_1.0_amd64
DPKG_LIB ?= clib4_1.0_amd64

##############################################################################

Expand Down Expand Up @@ -132,11 +132,30 @@ endif

VERBOSE ?= @

##########################################################################
# Set up version and date properties
##########################################################################

DATEISO = $(shell date --iso=date)
DATESTR = $(shell date "+%d.%m.%Y")

# Parse the repo tag to different defines, that will be used while
# compiling clib4 library
#
# The tags should be like v(MAJOR).(MINOR).(PATCH)
# in example v1.2.3
#
ifneq ($(origin GITTAG),undefined)
MAJOR = $(patsubst v%,%,$(firstword $(subst ., ,$(GITTAG))))
MINOR = $(word 2, $(subst ., ,$(GITTAG)))
PATCH = $(word 3, $(subst ., ,$(GITTAG)))
endif

##############################################################################

# This is the first target: it depends on all the targets

all: prepare all-targets all-libs clib4.library.debug clib4.library
all: gitver prepare all-targets all-libs clib4.library.debug clib4.library

##############################################################################

Expand Down Expand Up @@ -182,12 +201,12 @@ ALL_TARGETS = \
$(OUTPUT_LIB)/crtend.o \
$(OUTPUT_LIB)/shcrtbegin.o \
$(OUTPUT_LIB)/shcrtend.o \
$(OUT_SHARED_LIB)/shared_library/clib4.o \
$(OUT_SHARED_LIB)/shared_library/math.o \
$(OUT_SHARED_LIB)/shared_library/clib4.o \
$(OUT_SHARED_LIB)/shared_library/math.o \
$(MAIN_LIB)

ifdef SPE
ALL_TARGETS := PatchForSPE | $(ALL_TARGETS)
ALL_TARGETS := PatchForSPE | $(ALL_TARGETS)
endif

all-targets: $(ALL_TARGETS)
Expand All @@ -213,6 +232,16 @@ clean:

##############################################################################

gitver:
$(VERBOSE)sed -i 's/[(]\([0-9]*\.[0-9]*\.[0-9]*\)[)]/($(DATESTR))/g' library/c.lib_rev.h
$(VERBOSE)sed -i 's/"\([0-9]*\.[0-9]*\.[0-9]*\)"/"$(DATESTR)"/g' library/c.lib_rev.h
ifdef GITTAG
$(VERBOSE)sed -i 's/VERSION\t*[[:digit:]]/VERSION\t\t\t$(MAJOR)/g' library/c.lib_rev.h
$(VERBOSE)sed -i 's/REVISION\t*[[:digit:]]/REVISION\t\t$(MINOR)/g' library/c.lib_rev.h
$(VERBOSE)sed -i 's/SUBREVISION\t*[[:digit:]]/SUBREVISION\t\t$(PATCH)/g' library/c.lib_rev.h
$(VERBOSE)sed -i 's/clib4.library [0-9]*\.[0-9]*\.[0-9]*/clib4.library $(MAJOR).$(MINOR).$(PATCH)/g' library/c.lib_rev.h
endif

# Update the version numbers bound to the individual libraries
version:
$(COPY) c.lib_rev.rev amiga/amiga.lib_rev.rev
Expand Down
4 changes: 2 additions & 2 deletions library/c.lib_rev.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#define VERSION 1
#define REVISION 0
#define SUBREVISION 0
#define SUBREVISION 0

#define DATE "27.09.2023"
#define VERS "clib4.library 1.0.0"
#define VSTRING "clib4.library 1.0.0 (27.09.2023)\r\n"
#define VERSTAG "\0$VER: clib4.library 1.0.0 (27.09.2023)"
#define VERSTAG "\0$VER: clib4.library 1.0.0 (27.09.2023)"
19 changes: 15 additions & 4 deletions library/include/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ struct pthread_mutexattr {

typedef struct pthread_mutexattr pthread_mutexattr_t;

struct pthread_mutex;
struct pthread_mutex {
void* mutex; // APTR
int kind;
int incond;
struct Task *owner;
};

typedef struct pthread_mutex pthread_mutex_t;

Expand All @@ -166,11 +171,15 @@ struct pthread_condattr {

typedef struct pthread_condattr pthread_condattr_t;

struct pthread_cond;
struct pthread_cond {
int pad1;
void* semaphore; // SignalSemaphore
void* waiters; // MinList
};

typedef struct pthread_cond pthread_cond_t;

#define PTHREAD_COND_INITIALIZER {0, NULL_SEMAPHORE, NULL_MINLIST}
#define PTHREAD_COND_INITIALIZER {0, 0, 0}

//
// Barriers
Expand Down Expand Up @@ -198,7 +207,9 @@ struct pthread_rwlockattr {

typedef struct pthread_rwlockattr pthread_rwlockattr_t;

struct pthread_rwlock;
struct pthread_rwlock {
void* semaphore; // SignalSemaphore
};

typedef struct pthread_rwlock pthread_rwlock_t;

Expand Down
Loading