This repository has been archived by the owner on Jun 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Mircea Anton
committed
Feb 8, 2022
1 parent
58f9318
commit 535a1d4
Showing
1 changed file
with
83 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
name: Build | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
build-on-amd64: | ||
runs-on: ubuntu-20.04 | ||
name: Build release binary on amd64 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libsfml-dev | ||
- name: Build | ||
run: | | ||
make build-release | ||
cp pacman pacmanMP-ubuntu2004_amd64 | ||
- name: Add compiled binary to release | ||
uses: AButler/upload-release-assets@v2.0 | ||
with: | ||
files: 'pacmanMP-ubuntu2004_amd64' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
build-on-other: | ||
runs-on: ubuntu-18.04 | ||
name: Build release binary on ${{ matrix.arch }} ${{ matrix.distro }} | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- arch: armv6 | ||
distro: alpine_latest | ||
- arch: armv7 | ||
distro: alpine_latest | ||
- arch: aarch64 | ||
distro: alpine_latest | ||
- arch: s390x | ||
distro: alpine_latest | ||
- arch: ppc64le | ||
distro: alpine_latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2.1.1 | ||
|
||
- name: Build on ${{ matrix.arch }} ${{ matrix.distro }} | ||
uses: uraimo/run-on-arch-action@v2.1.1 | ||
id: runcmd | ||
with: | ||
arch: ${{ matrix.arch }} | ||
distro: ${{ matrix.distro }} | ||
|
||
setup: | | ||
mkdir -p "${PWD}/artifacts" | ||
dockerRunArgs: | | ||
--volume "${PWD}/artifacts:/artifacts" | ||
env: | | ||
artifact_name: pacmanMP-${{ matrix.distro }}_${{ matrix.arch }} | ||
install: | | ||
apk add --update make | ||
apk add --update g++ | ||
apk add --update sfml-dev | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libsfml-dev | ||
- name: Add compiled binary to release | ||
uses: AButler/upload-release-assets@v2.0 | ||
with: | ||
files: 'artifacts/*' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |