forked from crillab/d4v2
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
639fe80
commit 50bc3ff
Showing
65 changed files
with
5,776 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
name: Container | ||
|
||
on: | ||
- push | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: softvare-group/d4v2 | ||
TAG: ${{ github.ref_name }} | ||
|
||
jobs: | ||
Build: | ||
strategy: | ||
matrix: | ||
target: | ||
- double: aarch64-linux # target we are building for | ||
architecture: arm64 # container architecture label | ||
emulated: true # whether this build host is being emulated | ||
- double: x86_64-linux | ||
architecture: amd64 | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: QEMU | ||
if: ${{ matrix.target.emulated }} | ||
run: sudo apt-get install -y qemu-user-static | ||
- name: Nix | ||
uses: DeterminateSystems/nix-installer-action@v10 | ||
with: | ||
extra-conf: | | ||
extra-platforms = ${{ matrix.target.double }} | ||
- name: Cache | ||
uses: DeterminateSystems/magic-nix-cache-action@v4 | ||
- name: Build | ||
run: nix build -L .#packages.${{ matrix.target.double }}.container | ||
- name: Login | ||
run: nix run nixpkgs#skopeo -- login $REGISTRY --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} | ||
- name: Push | ||
run: nix run nixpkgs#skopeo -- copy docker-archive:result docker://$REGISTRY/$IMAGE_NAME:$TAG-${{ matrix.target.architecture }} | ||
- name: Push latest tag | ||
if: ${{ github.ref_type == 'tag' }} | ||
run: nix run nixpkgs#skopeo -- copy docker://$REGISTRY/$IMAGE_NAME:$TAG-${{ matrix.target.architecture }} docker://$REGISTRY/$IMAGE_NAME:latest-${{ matrix.target.architecture }} | ||
#name: Container | ||
# | ||
#on: | ||
# - push | ||
# | ||
#env: | ||
# REGISTRY: ghcr.io | ||
# IMAGE_NAME: softvare-group/d4v2 | ||
# TAG: ${{ github.ref_name }} | ||
# | ||
#jobs: | ||
# Build: | ||
# strategy: | ||
# matrix: | ||
# target: | ||
# - double: aarch64-linux # target we are building for | ||
# architecture: arm64 # container architecture label | ||
# emulated: true # whether this build host is being emulated | ||
# - double: x86_64-linux | ||
# architecture: amd64 | ||
# runs-on: ubuntu-24.04 | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# - name: QEMU | ||
# if: ${{ matrix.target.emulated }} | ||
# run: sudo apt-get install -y qemu-user-static | ||
# - name: Nix | ||
# uses: DeterminateSystems/nix-installer-action@v10 | ||
# with: | ||
# extra-conf: | | ||
# extra-platforms = ${{ matrix.target.double }} | ||
# - name: Cache | ||
# uses: DeterminateSystems/magic-nix-cache-action@v4 | ||
# - name: Build | ||
# run: nix build -L .#packages.${{ matrix.target.double }}.container | ||
# - name: Login | ||
# run: nix run nixpkgs#skopeo -- login $REGISTRY --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Push | ||
# run: nix run nixpkgs#skopeo -- copy docker-archive:result docker://$REGISTRY/$IMAGE_NAME:$TAG-${{ matrix.target.architecture }} | ||
# - name: Push latest tag | ||
# if: ${{ github.ref_type == 'tag' }} | ||
# run: nix run nixpkgs#skopeo -- copy docker://$REGISTRY/$IMAGE_NAME:$TAG-${{ matrix.target.architecture }} docker://$REGISTRY/$IMAGE_NAME:latest-${{ matrix.target.architecture }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
name: Portable | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
Build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- double: x86_64-linux | ||
runner: ubuntu-latest | ||
runs-on: ${{ matrix.target.runner }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Nix | ||
uses: DeterminateSystems/nix-installer-action@v10 | ||
- name: Cache | ||
uses: DeterminateSystems/magic-nix-cache-action@v4 | ||
- name: Bundle | ||
run: nix bundle --bundler github:DavHau/nix-portable -o bundle | ||
- name: Upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: d4-${{ matrix.target.double }}-portable | ||
path: bundle | ||
#name: Portable | ||
# | ||
#on: | ||
# - push | ||
# | ||
#jobs: | ||
# Build: | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# target: | ||
# - double: x86_64-linux | ||
# runner: ubuntu-latest | ||
# runs-on: ${{ matrix.target.runner }} | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# - name: Nix | ||
# uses: DeterminateSystems/nix-installer-action@v10 | ||
# - name: Cache | ||
# uses: DeterminateSystems/magic-nix-cache-action@v4 | ||
# - name: Bundle | ||
# run: nix bundle --bundler github:DavHau/nix-portable -o bundle | ||
# - name: Upload | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: d4-${{ matrix.target.double }}-portable | ||
# path: bundle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
include(FindPackageHandleStandardArgs) | ||
|
||
# Keep track of the original library suffixes to reset them later. | ||
set(_gpmc_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) | ||
|
||
# Look for .a or .lib libraries in case of a static library. | ||
if(GPMC_USE_STATIC_LIBS) | ||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a .lib) | ||
endif() | ||
|
||
# Find libraries and headers. | ||
find_library(GPMC_LIBRARY NAMES gpmc) | ||
find_path(GPMC_INCLUDE_DIR NAMES gpmc.hpp) | ||
|
||
# Windows (dynamic): Also find import libraries. | ||
if(WIN32 AND NOT GPMC_USE_STATIC_LIBS) | ||
set(CMAKE_FIND_LIBRARY_SUFFIXES .dll.a .lib) | ||
find_library(GPMC_IMPORT_LIBRARY NAMES gpmc) | ||
endif() | ||
|
||
# Reset library suffixes. | ||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${_gpmc_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) | ||
|
||
# Register the found package. | ||
if(WIN32 AND NOT GPMC_USE_STATIC_LIBS) | ||
# Windows (dynamic): also require import libraries. | ||
find_package_handle_standard_args(GPMC REQUIRED_VARS GPMC_LIBRARY GPMC_IMPORT_LIBRARY GPMC_INCLUDE_DIR) | ||
else() | ||
find_package_handle_standard_args(GPMC REQUIRED_VARS GPMC_LIBRARY GPMC_INCLUDE_DIR) | ||
endif() | ||
|
||
if(GPMC_FOUND) | ||
mark_as_advanced(GPMC_LIBRARY) | ||
mark_as_advanced(GPMC_IMPORT_LIBRARY) | ||
mark_as_advanced(GPMC_INCLUDE_DIR) | ||
|
||
# Create targets in case not already done. | ||
if(NOT TARGET GPMC::GPMC) | ||
if(GPMC_USE_STATIC_LIBS) | ||
add_library(GPMC::GPMC STATIC IMPORTED) | ||
else() | ||
add_library(GPMC::GPMC SHARED IMPORTED) | ||
endif() | ||
|
||
# Set library and include paths. | ||
set_target_properties(GPMC::GPMC PROPERTIES IMPORTED_LOCATION ${GPMC_LIBRARY}) | ||
target_include_directories(GPMC::GPMC INTERFACE ${GPMC_INCLUDE_DIR}) | ||
|
||
# Windows (dynamic): Also set import library. | ||
if(WIN32 AND NOT GPMC_USE_STATIC_LIBS) | ||
set_target_properties(GPMC::GPMC PROPERTIES IMPORTED_IMPLIB ${GPMC_IMPORT_LIBRARY}) | ||
endif() | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.