Skip to content

Commit 772160a

Browse files
authored
Build for Ubuntu 20.04 on CI
1 parent 678bb55 commit 772160a

File tree

1 file changed

+51
-4
lines changed

1 file changed

+51
-4
lines changed

.github/workflows/main.yml

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- swiftwasm-release/5.3
1212

1313
jobs:
14-
linux_build:
14+
ubuntu_18.04_build:
1515
timeout-minutes: 0
1616
runs-on: ubuntu-18.04
1717

@@ -48,14 +48,60 @@ jobs:
4848
- name: Upload Linux installable archive
4949
uses: actions/upload-artifact@v1
5050
with:
51-
name: linux-installable
51+
name: ubuntu_18.04-installable
5252
path: ../swift-wasm-DEVELOPMENT-SNAPSHOT-linux.tar.gz
5353
# - name: Pack test results
5454
# run: tar cJf swift-test-results.tar.gz ../build/*/swift-linux-x86_64/swift-test-results
5555
# - name: Upload test results
5656
# uses: actions/upload-artifact@v1
5757
# with:
5858
# name: linux-test-results
59+
# path: ./swift-test-results.tar.gz
60+
61+
ubuntu_20.04_build:
62+
timeout-minutes: 0
63+
runs-on: ubuntu-20.04
64+
65+
steps:
66+
- name: Free disk space
67+
run: |
68+
df -h
69+
sudo swapoff -a
70+
sudo rm -f /swapfile
71+
sudo rm -rf /opt/hostedtoolcache
72+
sudo rm -rf /usr/share/dotnet
73+
sudo apt clean
74+
docker rmi $(docker image ls -aq)
75+
df -h
76+
- uses: actions/checkout@v1
77+
with:
78+
path: swift
79+
- name: Prepare sccache timestamp
80+
id: cache_timestamp
81+
shell: cmake -P {0}
82+
run: |
83+
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
84+
message("::set-output name=timestamp::${current_date}")
85+
- uses: actions/cache@v1
86+
with:
87+
path: ../build-cache
88+
key: ${{ runner.os }}-sccache-v10-${{ steps.cache_timestamp.outputs.timestamp }}
89+
restore-keys: |
90+
${{ runner.os }}-sccache-v10-
91+
- name: Build Linux installable archive
92+
run: |
93+
./utils/webassembly/ci.sh
94+
# - name: Upload Linux installable archive
95+
# uses: actions/upload-artifact@v1
96+
# with:
97+
# name: linux-installable
98+
# path: ../swift-wasm-DEVELOPMENT-SNAPSHOT-linux.tar.gz
99+
# - name: Pack test results
100+
# run: tar cJf swift-test-results.tar.gz ../build/*/swift-linux-x86_64/swift-test-results
101+
# - name: Upload test results
102+
# uses: actions/upload-artifact@v1
103+
# with:
104+
# name: linux-test-results
59105
# path: ./swift-test-results.tar.gz
60106

61107
macos_build:
@@ -129,10 +175,11 @@ jobs:
129175
with:
130176
name: macos-hello.wasm
131177
path: hello.wasm
132-
linux_smoke_test:
178+
179+
ubuntu_18.04_smoke_test:
133180
name: Run smoke tests on Linux
134181
runs-on: ubuntu-18.04
135-
needs: linux_build
182+
needs: ubuntu_18.04_build
136183
steps:
137184
- name: Download installable Linux archive
138185
uses: actions/download-artifact@v1

0 commit comments

Comments
 (0)