Browse Source

Refactor to have better artifact names.

Yao Wei Tjong 姚伟忠 5 years ago
parent
commit
dbd90fb195
3 changed files with 10 additions and 10 deletions
  1. 2 2
      .github/workflows/ci_cd.rake
  2. 7 7
      .github/workflows/main.yml
  3. 1 1
      Rakefile

+ 2 - 2
.github/workflows/ci_cd.rake

@@ -46,7 +46,7 @@ task :ci do
     end
   end
   ENV['BUILD_TREE'] = 'build/ci'
-  ENV['CMAKE_BUILD_TYPE'] = ENV['BUILD_TYPE'] == 'dbg' ? 'Debug' : 'Release' unless ENV.fetch('BUILD_TYPE', '').empty?
+  ENV['CMAKE_BUILD_TYPE'] = ENV['BUILD_TYPE'] == 'dbg' ? 'Debug' : 'Release' if /dbg|rel/ =~ ENV['BUILD_TYPE']
   case ENV['GRAPHICS_API']
   when 'DX11'
     ENV['URHO3D_D3D11'] = '1'
@@ -57,7 +57,7 @@ task :ci do
   else
     # Do nothing
   end
-  ENV['URHO3D_LIB_TYPE'] = ENV['LIB_TYPE'].upcase
+  ENV['URHO3D_LIB_TYPE'] = ENV['LIB_TYPE'].upcase if /static|shared/ =~ ENV['LIB_TYPE']
   ENV['URHO3D_TESTING'] = '1' if /linux|macOS|win/ =~ ENV['PLATFORM']
   ENV['URHO3D_LINT'] = '1' if ENV['MODIFIER'] == 'clang-tidy'
   ENV['URHO3D_STYLE'] = '1' if ENV['MODIFIER'] == 'clang-format'

+ 7 - 7
.github/workflows/main.yml

@@ -51,12 +51,12 @@ jobs:
           - rel
           - dbg
         include:
-          - { platform: web, lib-type: static, build-type: rel }
-          - { platform: web, lib-type: static, build-type: dbg }
-          - { platform: android, lib-type: static }
-          - { platform: android, lib-type: shared }
-          - { platform: linux-clang-tidy, lib-type: static }
-          - { platform: linux-clang-format, lib-type: static }
+          - { platform: web, lib-type: static, architecture: wasm, build-type: rel }
+          - { platform: web, lib-type: static, architecture: wasm, build-type: dbg }
+          - { platform: android, lib-type: static, architecture: all, build-type: both }
+          - { platform: android, lib-type: shared, architecture: all, build-type: both }
+          - { platform: linux-clang-tidy }
+          - { platform: linux-clang-format }
     env:
       HOST: ${{ github.job }}
       PLATFORM: ${{ matrix.platform }}
@@ -155,7 +155,7 @@ jobs:
       - name: Upload artifact
         uses: actions/upload-artifact@v2
         with:
-          name: ${{ matrix.platform }}-${{ matrix.lib-type }}--rel
+          name: ${{ matrix.platform }}-${{ matrix.lib-type }}-all-rel
           path: build/ci/*.tar.gz
   windows:
     name: 🔲

+ 1 - 1
Rakefile

@@ -181,7 +181,7 @@ def init_default
     abort "Unsupported host system: #{build_host}"
   end
   # The 'ARCH' env-var, when set, has higher precedence than the 'URHO3D_64BIT' env-var
-  ENV['URHO3D_64BIT'] = ENV['ARCH'] == '32' ? '0' : '1' unless ENV.fetch('ARCH', '').empty?
+  ENV['URHO3D_64BIT'] = ENV['ARCH'] == '32' ? '0' : '1' if /32|64/ =~ ENV['ARCH']
 end
 
 def lint_err_file