Skip to content

Commit 79e5760

Browse files
authoredFeb 22, 2020
Various github action cleanups / improvements (#104)
- Don't build pushes to non-main branches, only build the PR itself. - Remove special windows llvm-nm installation The SDK build process itself builds llvm so we don't need to download it. - Make the `name` the first item in each step. I peronally find this more readable.
1 parent 79d881c commit 79e5760

File tree

1 file changed

+20
-24
lines changed

1 file changed

+20
-24
lines changed
 

‎.github/workflows/main.yml

+20-24
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: CI
2-
on: [push, pull_request]
2+
3+
on:
4+
create:
5+
tags:
6+
push:
7+
branches:
8+
- master
9+
pull_request:
310

411
jobs:
512
build:
@@ -17,33 +24,22 @@ jobs:
1724
- uses: actions/checkout@v1
1825
with:
1926
submodules: true
20-
- run: |
21-
# Windows releases of LLVM don't include the llvm-nm tool, which is needed for building
22-
# wasi-libc. Rust's llvm-tools include llvm-nm, and Rust is installed on Azure's Windows
23-
# images, so we can use that to make llvm-nm available without too much overhead.
24-
rustup update stable
25-
rustup default stable
26-
rustup component add llvm-tools-preview
27-
echo "::set-env name=WASM_NM::$(rustc --print sysroot|sed 's|C:|/c|'|sed 's|\\|/|g')/lib/rustlib/x86_64-pc-windows-msvc/bin/llvm-nm.exe"
28-
shell: bash
29-
name: Install llvm-nm (Windows)
30-
if: matrix.os == 'windows-latest'
31-
- run: choco install ninja
32-
name: Install Ninja (Windows)
27+
- name: Install ninja (Windows)
28+
run: choco install ninja
3329
if: matrix.os == 'windows-latest'
34-
- run: brew install ninja
35-
name: Install Ninja (macOS)
30+
- name: Install ninja (macOS)
31+
run: brew install ninja
3632
if: matrix.os == 'macos-latest'
37-
- run: sudo apt install ninja-build
38-
name: Install Ninja (Linux)
33+
- name: Install ninja (Linux)
34+
run: sudo apt install ninja-build
3935
if: matrix.os == 'ubuntu-latest'
40-
- run: sudo make -j4 package
41-
shell: bash
42-
name: Build
43-
- run: make check
44-
name: Run the testsuite
36+
- name: Build
37+
run: sudo make -j4 package
38+
- name: Run the testsuite
39+
run: make check
4540
if: matrix.os == 'ubuntu-latest'
46-
- uses: actions/upload-artifact@v1
41+
- name: Upload artifacts
42+
uses: actions/upload-artifact@v1
4743
with:
4844
# Upload the dist folder. Give it a name according to the OS it was built for.
4945
name: ${{ format( 'dist-{0}.tgz', matrix.os) }}

0 commit comments

Comments
 (0)
Please sign in to comment.