-
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
Showing
3 changed files
with
30 additions
and
122 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 |
---|---|---|
@@ -1,58 +1,16 @@ | ||
name: Build Linux | ||
name: Build - Linux | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
repository_dispatch: | ||
types: [init] | ||
|
||
concurrency: | ||
group: environment-lin-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build - ${{ matrix.config.os }} | ||
call-workflow: | ||
uses: Silverlan/pragma/.github/workflows/build-module.yml@main | ||
if: github.repository != 'Silverlan/pr_module_template' | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- os: ubuntu-22.04 | ||
name: "Ubuntu GCC-11" | ||
artifact: "ubuntu_gcc.7z" | ||
build_type: "RelWithDebInfo" | ||
cc: "clang-14" | ||
cxx: "clang++-14" | ||
archiver: "7z a" | ||
generators: "Unix Makefiles" | ||
build_dir: 'build' | ||
steps: | ||
- name: Get Module Info | ||
id: module-info | ||
uses: Silverlan/pr_module_template/github_actions/get_module_info@main | ||
|
||
- name: Build Module | ||
id: build-module | ||
uses: Silverlan/pragma/github_actions/build_generic_module@main | ||
with: | ||
module: '${{ steps.module-info.outputs.module_name }}' | ||
|
||
- name: Create Release Files | ||
shell: bash | ||
run: | | ||
if [ "${{ steps.module-info.outputs.release_directory }}" != "DEFAULT" ]; then | ||
mkdir -p "release/${{ steps.module-info.outputs.release_directory }}" | ||
cp -a "${{ steps.build-module.outputs.install-dir }}/${{ steps.module-info.outputs.release_directory }}." "release/${{ steps.module-info.outputs.release_directory }}" | ||
else | ||
mkdir -p "release/${{ steps.module-info.outputs.install_directory }}" | ||
cp "${{ steps.build-module.outputs.install-dir }}/${{ steps.module-info.outputs.install_directory }}lib${{ steps.module-info.outputs.module_name }}.so" "release/${{ steps.module-info.outputs.install_directory }}" | ||
fi | ||
- name: Release Binaries | ||
uses: Silverlan/common_actions/release_nightly_binaries@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit: ${{ github.ref_name }} | ||
with: | ||
repository: '${{ github.repository }}' | ||
os: linux | ||
secrets: | ||
repository_token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
permissions: | ||
contents: write |
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,59 +1,16 @@ | ||
name: Build Windows | ||
name: Build - Windows | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
repository_dispatch: | ||
types: [init] | ||
|
||
concurrency: | ||
group: environment-win-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build - ${{ matrix.config.os }} | ||
call-workflow: | ||
uses: Silverlan/pragma/.github/workflows/build-module.yml@main | ||
if: github.repository != 'Silverlan/pr_module_template' | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- os: windows-latest | ||
name: "Windows x64 MSVC" | ||
artifact: "Windows-MSVC.tar.xz" | ||
build_type: "RelWithDebInfo" | ||
environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" | ||
cc: "cl" | ||
cxx: "cl" | ||
archiver: "7z a" | ||
generators: "Visual Studio 16 2022" | ||
build_dir: 'build' | ||
steps: | ||
- name: Get Module Info | ||
id: module-info | ||
uses: Silverlan/pr_module_template/github_actions/get_module_info@main | ||
|
||
- name: Build Module | ||
id: build-module | ||
uses: Silverlan/pragma/github_actions/build_generic_module@main | ||
with: | ||
module: '${{ steps.module-info.outputs.module_name }}' | ||
|
||
- name: Create Release Files | ||
shell: bash | ||
run: | | ||
if [ "${{ steps.module-info.outputs.release_directory }}" != "DEFAULT" ]; then | ||
mkdir -p "release/${{ steps.module-info.outputs.release_directory }}" | ||
cp -a "${{ steps.build-module.outputs.install-dir }}/${{ steps.module-info.outputs.release_directory }}." "release/${{ steps.module-info.outputs.release_directory }}" | ||
else | ||
mkdir -p "release/${{ steps.module-info.outputs.install_directory }}" | ||
cp "${{ steps.build-module.outputs.install-dir }}/${{ steps.module-info.outputs.install_directory }}${{ steps.module-info.outputs.module_name }}.dll" "release/${{ steps.module-info.outputs.install_directory }}" | ||
fi | ||
- name: Release Binaries | ||
uses: Silverlan/common_actions/release_nightly_binaries@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit: ${{ github.ref_name }} | ||
with: | ||
repository: '${{ github.repository }}' | ||
os: windows | ||
secrets: | ||
repository_token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
permissions: | ||
contents: write |
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