Skip to content

Commit

Permalink
Run builds in parallel, build linux-x86_64 for alpine (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaZezulinsky authored Oct 21, 2024
1 parent b218a22 commit 17014d9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
40 changes: 22 additions & 18 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
name: librandomy pipeline
on: push
jobs:
build:
build-mac:
strategy:
matrix:
config:
- {os: ubuntu-latest, path: linux-x86_64, arch: x86_64}
- {os: macos-13, path: darwin-x86_64, arch: x86_64}
- {os: macos-latest, path: darwin-arm64, arch: arm64}
- {os: windows-latest, path: windows-x86_64, arch: x86_64}
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build & Test
run: |
uname -m
mkdir build && cd build && cmake -DCMAKE_OSX_ARCHITECTURES=${{ matrix.config.arch }} .. && make -j$(sysctl -n hw.ncpu) && ./randomx-tests
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.path }}
path: build/librandomx.a

build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Win
if: ${{ matrix.config.os == 'windows-latest' }}
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
Expand All @@ -24,31 +36,22 @@ jobs:
mingw-w64-x86_64-cmake
mingw-w64-x86_64-gcc
- name: Build & Test
if: ${{ matrix.config.os == 'ubuntu-latest' }}
run: |
mkdir build && cd build && cmake .. && make -j$(nproc) && ./randomx-tests
- name: Build & Test
if: ${{ matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-13' }}
run: |
uname -m
mkdir build && cd build && cmake -DCMAKE_OSX_ARCHITECTURES=${{ matrix.config.arch }} .. && make -j$(sysctl -n hw.ncpu) && ./randomx-tests
- name: Build & Test
if: ${{ matrix.config.os == 'windows-latest' }}
shell: msys2 {0}
run: |
mkdir build && cd build && cmake .. -G "MinGW Makefiles" && mingw32-make && ./randomx-tests
mkdir build && cd build && cmake .. -G "MinGW Makefiles" && mingw32-make -j$(echo $NUMBER_OF_PROCESSORS) && ./randomx-tests
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.config.path }}
name: windows-x86_64
path: build/librandomx.a

build-alpine:
strategy:
matrix:
config:
- {arch: x86_64, branch: latest-stable}
- {arch: aarch64, branch: latest-stable}
- {arch: riscv64, branch: edge}
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -68,10 +71,11 @@ jobs:
with:
name: linux-${{ matrix.config.arch }}
path: build/librandomx.a

release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: [build, build-alpine]
needs: [build-mac, build-windows, build-alpine]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 0 additions & 6 deletions Dockerfile

This file was deleted.

0 comments on commit 17014d9

Please sign in to comment.