-
Notifications
You must be signed in to change notification settings - Fork 0
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
2274ebd
commit d3d73ac
Showing
4 changed files
with
131 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,110 @@ | ||
name: Upload prebuild binaries | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
nightly: | ||
name: Deploy releases | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# ubuntu / linux must run on kinda old linux for glibc compatibility! | ||
os: [ubuntu-20.04, windows-latest, macos-latest] | ||
arch: [x86_64] | ||
include: | ||
- os: macos-latest | ||
arch: arm64-apple-macos | ||
arch_short: arm64 | ||
cross: "1" | ||
# ARM linux needs to download runtime from ldc, which isn't yet supported with setup-dlang | ||
# - os: ubuntu-20.04 | ||
# arch: aarch64-linux-gnu | ||
# arch_short: aarch64 | ||
# cross: "1" | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- id: vars | ||
shell: bash | ||
run: | | ||
if [ -z "${{matrix.arch_short}}" ]; then | ||
echo "arch_short=${{matrix.arch}}" >> $GITHUB_OUTPUT | ||
else | ||
echo "arch_short=${{matrix.arch_short}}" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Install D compiler | ||
uses: dlang-community/setup-dlang@v1 | ||
with: | ||
compiler: ldc-latest | ||
|
||
- name: Run tests | ||
run: dub test | ||
|
||
# Linux release | ||
- name: Build Linux release | ||
run: ./ci/build.sh | ||
if: matrix.os == 'ubuntu-20.04' | ||
env: | ||
ARCH: ${{ matrix.arch }} | ||
BUILD: release | ||
CROSS: ${{ matrix.cross }} | ||
|
||
- name: Deploy Linux release | ||
if: matrix.os == 'ubuntu-20.04' | ||
uses: WebFreak001/upload-asset@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OS: linux-${{ steps.vars.outputs.arch_short }} | ||
with: | ||
file: ./sdlfmt.tar.xz | ||
mime: application/x-gtar | ||
name: sdlfmt_${TAG}-${OS}.tar.xz | ||
|
||
# OSX release | ||
- name: Build OSX release | ||
run: ./ci/build.sh | ||
if: matrix.os == 'macos-latest' | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: '10.12' | ||
ARCH: ${{ matrix.arch }} | ||
BUILD: release | ||
CROSS: ${{ matrix.cross }} | ||
|
||
- name: Deploy OSX release | ||
if: matrix.os == 'macos-latest' | ||
uses: WebFreak001/upload-asset@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OS: osx-${{ steps.vars.outputs.arch_short }} | ||
with: | ||
file: ./sdlfmt.tar.xz | ||
mime: application/x-gtar | ||
name: sdlfmt_${TAG}-${OS}.tar.xz | ||
|
||
# Windows release | ||
- name: Build Windows release | ||
run: .\ci\build.bat | ||
if: matrix.os == 'windows-latest' | ||
env: | ||
BUILD: release | ||
ARCH: ${{ matrix.arch }} | ||
CROSS: ${{ matrix.cross }} | ||
|
||
- name: Deploy Windows release | ||
if: matrix.os == 'windows-latest' | ||
uses: WebFreak001/upload-asset@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OS: windows-${{ steps.vars.outputs.arch_short }} | ||
with: | ||
file: ./sdlfmt.zip | ||
mime: application/zip | ||
name: sdlfmt_${TAG}-${OS}.zip | ||
|
||
- name: cache dependency binaries | ||
uses: WebFreak001/[email protected] | ||
with: | ||
store: true |
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 |
---|---|---|
|
@@ -9,6 +9,8 @@ sdlfmt.dll | |
libsdlfmt.a | ||
sdlfmt.lib | ||
sdlfmt-test-* | ||
sdlfmt.tar.xz | ||
sdlfmt.zip | ||
*.exe | ||
*.pdb | ||
*.o | ||
|
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,7 @@ | ||
@echo on | ||
|
||
dub build --compiler=ldc2 --build=%BUILD% --arch=%ARCH% | ||
|
||
sdlfmt.exe --help | ||
|
||
7z a sdlfmt.zip sdlfmt.exe |
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,12 @@ | ||
set -e | ||
set -x | ||
|
||
dub build --compiler=ldc2 --build=$BUILD --arch=$ARCH | ||
strip sdlfmt | ||
if [ "$CROSS" = 1 ]; then | ||
ls sdlfmt | ||
else | ||
./sdlfmt --help | ||
fi | ||
|
||
tar cfJ sdlfmt.tar.xz sdlfmt |