1010
1111jobs :
1212 build-test-win :
13- # if: ${{ false }}
1413 runs-on : windows-latest
1514 steps :
16- - uses : actions/checkout@v1
17-
18- - name : Install stable toolchain (windows)
19- uses : actions-rs/toolchain@v1
20- with :
21- profile : minimal
22- toolchain : stable
23- target : x86_64-pc-windows-gnu
24- override : true
25- - name : Setup (windows)
26- run : |
27- $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
28- echo "PATH=${env:PATH}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
29- echo "CARGO_BUILD_TARGET=x86_64-pc-windows-gnu" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
30- - name : Build (windows)
31- run : |
32- cargo clean
33- cargo build
34- - name : Test (windows)
35- run : |
36- cargo test
15+ - uses : actions/checkout@v1
16+
17+ - name : Install stable toolchain (windows)
18+ uses : actions-rs/toolchain@v1
19+ with :
20+ profile : minimal
21+ toolchain : stable
22+ target : x86_64-pc-windows-gnu
23+ override : true
24+
25+ - name : Setup (windows)
26+ run : |
27+ $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:PATH"
28+ echo "PATH=${env:PATH}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
29+ echo "CARGO_BUILD_TARGET=x86_64-pc-windows-gnu" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
30+
31+ - name : Build (windows)
32+ run : |
33+ cargo clean
34+ cargo build
35+
36+ - name : Test (windows)
37+ run : |
38+ cargo test
3739
3840 build-test-msvc :
3941 if : ${{ false }}
@@ -48,25 +50,28 @@ jobs:
4850 toolchain : stable
4951 target : x86_64-pc-windows-msvc
5052 override : true
53+
5154 - name : Setup (windows)
5255 run : |
5356 echo "CARGO_BUILD_TARGET=x86_64-pc-windows-msvc" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
57+
5458 - name : Build (windows)
5559 run : |
5660 cargo clean
5761 cargo build --no-default-features --features quickjs-ng
62+
5863 - name : Test (windows)
5964 run : |
6065 cargo test --no-default-features --features quickjs-ng
6166
6267 build-test-mac :
63- runs-on : macOs -latest
68+ runs-on : macOS -latest
6469 steps :
65- - uses : actions/checkout@v3
66- - name : Build
67- run : cargo build --verbose
68- - name : Run tests
69- run : cargo test --verbose
70+ - uses : actions/checkout@v3
71+ - name : Build
72+ run : cargo build --verbose
73+ - name : Run tests
74+ run : cargo test --verbose
7075
7176 build-ubuntu-quickjs-ng :
7277 runs-on : ubuntu-latest
@@ -82,68 +87,50 @@ jobs:
8287 build :
8388 runs-on : ubuntu-latest
8489 steps :
85- - uses : actions/checkout@v2
86- - name : Prepare
87- run : |
88- sudo apt update
89- sudo apt install ccache llvm autoconf2.13 automake clang valgrind -y
90- - name : Cache cargo registry
91- uses : actions/cache@v2
92- with :
93- path : ~/.cargo/registry
94- key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
95- - name : Cache cargo index
96- uses : actions/cache@v2
97- with :
98- path : ~/.cargo/git
99- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
100- - name : Ccache
101- uses : actions/cache@v2
102- with :
103- path : ~/.ccache
104- key : ${{ runner.OS }}-ccache-${{ hashFiles('**\Cargo.toml') }}
105- - name : Build
106- run : |
107- export SHELL=/bin/bash
108- export CC=/usr/bin/clang
109- export CXX=/usr/bin/clang++
110- ccache -z
111- CCACHE=$(which ccache) cargo build --verbose
112- ccache -s
113- cargo clean
114- - name : Format
115- run : |
116- cargo fmt
117- - name : Commit fmt files
118- run : |
119- git config --local user.email "action@github.com"
120- git config --local user.name "GitHub Action"
121- git commit -m "autofmt" -a || true
122- git push "https://${{ github.actor }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git" HEAD:${{ github.ref }} || true
123- - name : Doc
124- run : |
125- cargo doc
126- - name : Commit docs
127- run : |
128- cp -r ./target/doc /tmp
129- cd /tmp/doc
130- git init
131- echo '<!DOCTYPE html><html><head><title>Redirect</title><meta http-equiv = "refresh" content = "0; url = https://hirofa.github.io/quickjs_es_runtime/quickjs_runtime/index.html" /></head><body><p>Redirecting</p></body></html>' >> index.html
132- git add .
133- git remote add origin https://github.com/${{ github.repository }}.git
134- git config --local user.email "action@github.com"
135- git config --local user.name "GitHub Action"
136- git commit -m "doc" -a || true
137- git push "https://${{ github.actor }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git" HEAD:gh-pages --force || true
138- - name : Deploy to gh-pages
139- run : |
140- curl -X POST https://api.github.com/repos/${{ github.repository }}/pages/builds -H "Accept: application/vnd.github.mister-fantastic-preview+json" -u ${{ github.actor }}:${{ secrets.GH_TOKEN }}
141- - name : Run tests
142- run : cargo test --verbose
143- - name : Clippy check
144- uses : actions-rs/clippy-check@v1
145- with :
146- token : ${{ secrets.GITHUB_TOKEN }}
90+ - uses : actions/checkout@v2
91+ - name : Prepare
92+ run : |
93+ sudo apt update
94+ sudo apt install llvm autoconf2.13 automake clang valgrind -y
95+ - name : Build
96+ run : |
97+ export SHELL=/bin/bash
98+ export CC=/usr/bin/clang
99+ export CXX=/usr/bin/clang++
100+ cargo build
101+ - name : Format
102+ run : |
103+ cargo fmt
104+ - name : Commit fmt files
105+ run : |
106+ git config --local user.email "action@github.com"
107+ git config --local user.name "GitHub Action"
108+ git commit -m "autofmt" -a || true
109+ git push "https://${{ github.actor }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git" HEAD:${{ github.ref }} || true
110+ - name : Doc
111+ run : |
112+ cargo doc
113+ - name : Commit docs
114+ run : |
115+ cp -r ./target/doc /tmp
116+ cd /tmp/doc
117+ git init
118+ echo '<!DOCTYPE html><html><head><title>Redirect</title><meta http-equiv = "refresh" content = "0; url = https://hirofa.github.io/quickjs_es_runtime/quickjs_runtime/index.html" /></head><body><p>Redirecting</p></body></html>' >> index.html
119+ git add .
120+ git remote add origin https://github.com/${{ github.repository }}.git
121+ git config --local user.email "action@github.com"
122+ git config --local user.name "GitHub Action"
123+ git commit -m "doc" -a || true
124+ git push "https://${{ github.actor }}:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git" HEAD:gh-pages --force || true
125+ - name : Deploy to gh-pages
126+ run : |
127+ curl -X POST https://api.github.com/repos/${{ github.repository }}/pages/builds -H "Accept: application/vnd.github.mister-fantastic-preview+json" -u ${{ github.actor }}:${{ secrets.GH_TOKEN }}
128+ - name : Run tests
129+ run : cargo test --verbose
130+ - name : Clippy check
131+ uses : actions-rs/clippy-check@v1
132+ with :
133+ token : ${{ secrets.GITHUB_TOKEN }}
147134
148135 test-and-valgrind :
149136 if : ${{ false }}
@@ -153,34 +140,15 @@ jobs:
153140 - name : Prepare
154141 run : |
155142 sudo apt update
156- sudo apt install ccache llvm autoconf2.13 automake clang valgrind -y
157- - name : Cache cargo registry
158- uses : actions/cache@v2
159- with :
160- path : ~/.cargo/registry
161- key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
162- - name : Cache cargo index
163- uses : actions/cache@v2
164- with :
165- path : ~/.cargo/git
166- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}
167- - name : Ccache
168- uses : actions/cache@v2
169- with :
170- path : ~/.ccache
171- key : ${{ runner.OS }}-ccache-${{ hashFiles('**\Cargo.toml') }}
143+ sudo apt install llvm autoconf2.13 automake clang valgrind -y
172144 - name : Build
173145 run : |
174146 export SHELL=/bin/bash
175147 export CC=/usr/bin/clang
176148 export CXX=/usr/bin/clang++
177- ccache -z
178- CCACHE=$(which ccache) cargo build --verbose
179- ccache -s
180- cargo clean
181- cargo build
149+ cargo build --verbose
182150 - name : Run tests
183151 run : cargo test --verbose
184152 - name : Valgrind
185153 run : |
186- find ./target/debug/deps/quickjs_runtime-* -maxdepth 1 -type f -executable | xargs valgrind --leak-check=full --error-exitcode=1
154+ find ./target/debug/deps/quickjs_runtime-* -maxdepth 1 -type f -executable | xargs valgrind --leak-check=full --error-exitcode=1
0 commit comments