Environment Variable Support #310
Workflow file for this run
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
name: Build and Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build-and-test: | |
runs-on: macos-latest | |
steps: | |
- name: 🐍 setup | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: ⬇️ sources | |
id: download-sources | |
uses: actions/checkout@v3 | |
- name: 🏗️ project files | |
id: setup-project-files | |
continue-on-error: true | |
run: | | |
mkdir build | |
cd build | |
cmake -DTRACY_ENABLE=OFF -DORC_BUILD_EXAMPLES=0 -GXcode .. | |
- name: 🛠️ orc debug | |
id: build-orc-debug | |
continue-on-error: true | |
run: | | |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_orc -configuration Debug -hideShellScriptEnvironment | |
- name: 🏃 orc_dogfood | |
id: build-orc-orc_dogfood | |
continue-on-error: true | |
run: | | |
ORC_OUTPUT_FILE=./output.json ORC_OUTPUT_FILE_MODE=json xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_dogfood -configuration Debug -hideShellScriptEnvironment | |
cat output.json | |
if [ `cat output.json | jq '.["synopsis"]["violations"]'` == 0 ]; then echo "SUCCESS"; else echo "FAILURE"; exit 1; fi | |
if [ `cat output.json | jq '.["synopsis"]["dies_skipped"]'` != 0 ]; then echo "SUCCESS"; else echo "FAILURE"; exit 1; fi | |
if [ `cat output.json | jq '.["synopsis"]["unique_symbols"]'` != 0 ]; then echo "SUCCESS"; else echo "FAILURE"; exit 1; fi | |
if [ `cat output.json | jq '.["synopsis"]["object_files_scanned"]'` != 0 ]; then echo "SUCCESS"; else echo "FAILURE"; exit 1; fi | |
- name: 🛠️ orc release | |
id: build-orc-release | |
continue-on-error: true | |
run: | | |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_orc -configuration Release -hideShellScriptEnvironment | |
- name: 🛠️ orc_test | |
id: build-orc_test | |
continue-on-error: true | |
run: | | |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_test -configuration Release -hideShellScriptEnvironment | |
- name: 🏃 orc_test | |
id: run-orc_test | |
continue-on-error: true | |
run: | | |
./build/Release/orc_test ./test/battery --json_mode > test_out.json | |
python ${GITHUB_WORKSPACE}/.github/orc_test_to_github_actions.py test_out.json | |
- name: 🛠️ orc_test w/ ASan | |
id: build-orc_test-asan | |
continue-on-error: true | |
run: | | |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_test -configuration Release -enableAddressSanitizer YES -hideShellScriptEnvironment | |
- name: 🏃 orc_test w/ ASan | |
id: run-orc_test-asan | |
continue-on-error: true | |
run: | | |
./build/Release/orc_test ./test/battery --json_mode > test_out.json | |
python ${GITHUB_WORKSPACE}/.github/orc_test_to_github_actions.py test_out.json | |
- name: 🛠️ orc_test w/ TSan | |
id: build-orc_test-tsan | |
continue-on-error: true | |
run: | | |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_test -configuration Release -enableThreadSanitizer YES -hideShellScriptEnvironment | |
- name: 🏃 orc_test w/ TSan | |
id: run-orc_test-tsan | |
continue-on-error: true | |
run: | | |
./build/Release/orc_test ./test/battery --json_mode > test_out.json | |
python ${GITHUB_WORKSPACE}/.github/orc_test_to_github_actions.py test_out.json | |
- name: 🛠️ orc_test w/ UBSan | |
id: build-orc_test-ubsan | |
continue-on-error: true | |
run: | | |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_test -configuration Release -enableUndefinedBehaviorSanitizer YES -hideShellScriptEnvironment | |
- name: 🏃 orc_test w/ UBSan | |
id: run-orc_test-ubsan | |
continue-on-error: true | |
run: | | |
./build/Release/orc_test ./test/battery --json_mode > test_out.json | |
python ${GITHUB_WORKSPACE}/.github/orc_test_to_github_actions.py test_out.json | |
- name: ✏️ github json | |
uses: jsdaniell/[email protected] | |
continue-on-error: true | |
with: | |
name: "github.json" | |
json: ${{ toJSON(github) }} | |
- name: ✏️ steps json | |
uses: jsdaniell/[email protected] | |
continue-on-error: true | |
with: | |
name: "steps.json" | |
json: ${{ toJSON(steps) }} | |
- name: ✍️ job summary | |
continue-on-error: false | |
run: | | |
python ${GITHUB_WORKSPACE}/.github/generate_job_summary.py $GITHUB_STEP_SUMMARY github.json steps.json |