Skip to content

Commit

Permalink
fixx
Browse files Browse the repository at this point in the history
  • Loading branch information
Turupawn committed Dec 5, 2020
1 parent 14df105 commit 2cb31db
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 39 deletions.
40 changes: 1 addition & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,46 +101,8 @@ jobs:
run: |
cd ${{ matrix.build-src-dir || '.' }}
cmake --build . --config ${{ matrix.build-config || 'Release' }}
zip -r tribilin.zip . -i Release/*
echo "::set-output name=asset_name::tribilin.zip"
echo "::set-output name=asset_path::tribilin.zip"
- name: Run test cases
run: |
cd ${{ matrix.build-dir || '.' }}
ctest -C ${{ matrix.build-config || 'Release' }} --output-on-failure
- name: Prepare artifact
if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash
run: |
mkdir Release
mv librosalila* Release
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: JustTestin
path: Release

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./tribilin.zip
asset_name: tribilin.zip
asset_content_type: application/zip
ctest -C ${{ matrix.build-config || 'Release' }} --output-on-failure
137 changes: 137 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: release

on:
release:
types: [published]

jobs:
build:
name: ${{ matrix.name }}

strategy:
fail-fast: true
matrix:
name:
- Ubuntu 16.04 GCC
- Ubuntu 16.04 Clang
- Ubuntu 18.04 GCC
- Ubuntu 18.04 Clang
- Windows 2019 MSVC
# - Windows 2019 GCC
- macOS 10.14 GCC
- macOS 10.14 Clang
include:
- name: Ubuntu 16.04 GCC
os: ubuntu-16.04
compiler: gcc
cpp-compiler: g++

- name: Ubuntu 16.04 Clang
os: ubuntu-16.04
compiler: clang
cpp-compiler: clang++
packages: llvm-3.5

- name: Ubuntu 18.04 GCC
os: ubuntu-18.04
compiler: gcc
cpp-compiler: g++

- name: Ubuntu 18.04 Clang
os: ubuntu-18.04
compiler: clang
cpp-compiler: clang++
packages: llvm-3.9

- name: Windows 2019 MSVC
os: windows-2019
compiler: cl
cmake-args: -DBUILD_SHARED_LIBS=OFF -Dgtest_force_shared_crt=on

# - name: Windows 2019 GCC
# os: windows-2019
# compiler: gcc
# cmake-args: -G Ninja
# packages: ninja

- name: macOS 10.14 GCC
os: macOS-10.14
compiler: gcc
cpp-compiler: g++

- name: macOS 10.14 Clang
os: macOS-10.14
compiler: clang
cpp-compiler: clang++

runs-on: ${{ matrix.os }}

steps:
- name: Install packages (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libsdl2-net-dev libglew-dev ${{ matrix.packages }}
- name: Install packages (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install sdl2 sdl2_image sdl2_mixer sdl2_ttf
- name: Install packages (Windows)
if: runner.os == 'Windows' && matrix.packages
run: |
choco install ${{ matrix.packages }}
- name: Checkout
uses: actions/checkout@v1

- name: Generate project files
run: |
mkdir ${{ matrix.build-dir || '.not-used' }}
cd ${{ matrix.build-dir || '.' }}
cmake ${{ matrix.build-src-dir || '.' }} -Dtest=on ${{ matrix.cmake-args }}
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.cpp-compiler }}
CFLAGS: ${{ matrix.cflags || env.CFLAGS }}
CXXFLAGS: ${{ matrix.cxxflags || env.CXXFLAGS }}
LDFLAGS: ${{ matrix.ldflags || env.LDFLAGS }}

- name: Compile source code
run: |
cd ${{ matrix.build-src-dir || '.' }}
cmake --build . --config ${{ matrix.build-config || 'Release' }}
zip -r tribilin.zip . -i Release/*
echo "::set-output name=asset_name::tribilin.zip"
echo "::set-output name=asset_path::tribilin.zip"
- name: Run test cases
run: |
cd ${{ matrix.build-dir || '.' }}
ctest -C ${{ matrix.build-config || 'Release' }} --output-on-failure
- name: Prepare artifact
if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash
run: |
mkdir Release
mv librosalila* Release
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: JustTestin
path: Release

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./tribilin.zip
asset_name: tribilin.zip
asset_content_type: application/zip

0 comments on commit 2cb31db

Please sign in to comment.